mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-31 07:20:14 -05:00
Makes data in OverlayCommand private.
This commit is contained in:
parent
b43eb2d0bd
commit
ea92a2e123
@ -9,7 +9,7 @@
|
||||
#include "Utils/StringHelper.h"
|
||||
|
||||
namespace Ship {
|
||||
bool OverlayCommand(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args) {
|
||||
bool GameOverlay::OverlayCommand(std::shared_ptr<Console> Console, const std::vector<std::string>& args) {
|
||||
if (args.size() < 3) {
|
||||
return CMD_FAILED;
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include "Console.h"
|
||||
#include "Lib/ImGui/imgui.h"
|
||||
#include <unordered_map>
|
||||
|
||||
@ -20,9 +22,8 @@ namespace Ship {
|
||||
|
||||
class GameOverlay {
|
||||
public:
|
||||
std::unordered_map<std::string, Overlay*> RegisteredOverlays;
|
||||
std::unordered_map<std::string, ImFont*> Fonts;
|
||||
std::string CurrentFont = "Default";
|
||||
static bool OverlayCommand(std::shared_ptr<Console> Console, const std::vector<std::string>& args);
|
||||
|
||||
void Init();
|
||||
void Draw();
|
||||
void DrawSettings();
|
||||
@ -33,7 +34,11 @@ namespace Ship {
|
||||
void TextDraw(float x, float y, bool shadow, ImVec4 color, const char* text, ...);
|
||||
void TextDrawNotification(float duration, bool shadow, const char* fmt, ...);
|
||||
private:
|
||||
std::unordered_map<std::string, ImFont*> Fonts;
|
||||
std::unordered_map<std::string, Overlay*> RegisteredOverlays;
|
||||
std::string CurrentFont = "Default";
|
||||
bool NeedsCleanup = false;
|
||||
|
||||
void CleanupNotifications();
|
||||
void LoadFont(const std::string& name, const std::string& path, float fontSize);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user