More refactoring in prep for a real design.
This commit is contained in:
parent
b9e9119832
commit
e35536c7e3
10 changed files with 229 additions and 186 deletions
18
gui.cpp
18
gui.cpp
|
@ -19,25 +19,11 @@ using namespace std;
|
|||
using namespace fmt;
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
vector<string> lines;
|
||||
|
||||
void output(const string &msg) {
|
||||
void GUI::output(const string &msg) {
|
||||
lines.push_back(msg);
|
||||
}
|
||||
|
||||
ButtonOption Style() {
|
||||
auto option = ButtonOption::Animated();
|
||||
option.transform = [](const EntryState& s) {
|
||||
auto element = paragraph(s.label);
|
||||
if (s.focused) {
|
||||
element |= bold;
|
||||
}
|
||||
return element | center | borderEmpty | flex;
|
||||
};
|
||||
return option;
|
||||
}
|
||||
|
||||
int main_loop(GameEngine &game, std::function<bool()> runner) {
|
||||
int GUI::main_loop(GameEngine &game, std::function<bool()> runner) {
|
||||
auto screen = ScreenInteractive::Fullscreen();
|
||||
screen.TrackMouse(true);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue