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