56 lines
899 B
C++
56 lines
899 B
C++
#pragma once
|
|
|
|
#include <iostream>
|
|
#include <vector>
|
|
|
|
namespace MPFW {
|
|
namespace Console {
|
|
class CommandHandler;
|
|
}
|
|
namespace UI {
|
|
|
|
|
|
struct WindowElement {
|
|
|
|
};
|
|
|
|
struct Menu {
|
|
std::string text;
|
|
std::string command = ""; int commandMode = 0;
|
|
std::vector<Menu> children;
|
|
};
|
|
|
|
|
|
|
|
class Window {
|
|
public:
|
|
Window() {}
|
|
Window(std::string path) { LoadWindow(path); }
|
|
std::string windowTitle;
|
|
std::vector<Menu> menuBar;
|
|
bool active = false;
|
|
|
|
void LoadWindow(std::string path);
|
|
|
|
~Window() { menuBar.clear(); }
|
|
};
|
|
|
|
|
|
// main class that does the rendering of the UI y'know
|
|
class UIRenderer {
|
|
bool cursorState = false; // false = off, true = on
|
|
public:
|
|
bool showCursorOnLaunch = false;
|
|
UIRenderer();
|
|
bool rendererIsActive = false;
|
|
MPFW::Console::CommandHandler* cmh;
|
|
std::vector<Window> windows;
|
|
void Render();
|
|
~UIRenderer();
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
} |