|
|
|
@ -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);
|
|
|
|
|
};
|
|
|
|
|