Now mostly working with GUECS but shaders are still busted. Have to find out why they stopped working.
This commit is contained in:
parent
a5f6a82611
commit
ac22a11c9f
27 changed files with 162 additions and 1210 deletions
11
gui.cpp
11
gui.cpp
|
@ -13,9 +13,12 @@
|
|||
#include <iostream>
|
||||
#include "sound.hpp"
|
||||
#include "shaders.hpp"
|
||||
#include "constants.hpp"
|
||||
#include "backend.hpp"
|
||||
|
||||
using std::string, std::vector;
|
||||
|
||||
|
||||
GUI::GUI(int timer_seconds, const std::wstring &g) :
|
||||
$timer_seconds(timer_seconds),
|
||||
$goal(g),
|
||||
|
@ -34,7 +37,7 @@ GUI::GUI(int timer_seconds, const std::wstring &g) :
|
|||
"[_|_|*%(300,100)clock|_|_]"
|
||||
"[hp_bar]");
|
||||
|
||||
$gui.world().set_the<Background>({$gui.$parser, {0,0,0,0}});
|
||||
$gui.set<Background>($gui.MAIN, {$gui.$parser, {0,0,0,0}});
|
||||
|
||||
for(auto& [name, cell] : $gui.cells()) {
|
||||
auto ent = $gui.entity(name);
|
||||
|
@ -54,17 +57,17 @@ GUI::GUI(int timer_seconds, const std::wstring &g) :
|
|||
|
||||
auto clock = $gui.entity("clock");
|
||||
auto& clock_rect = $gui.get<Rectangle>(clock);
|
||||
clock_rect.color = ColorValue::BLACK;
|
||||
clock_rect.color = THEME.BLACK;
|
||||
$gui.set<Label>(clock, {L"00:00:00", 60});
|
||||
|
||||
auto goal = $gui.entity("goal");
|
||||
std::wstring msg = fmt::format(L"Complete '{}' in:", $goal);
|
||||
auto& goal_rect = $gui.get<Rectangle>(goal);
|
||||
goal_rect.color = ColorValue::BLACK;
|
||||
goal_rect.color = THEME.BLACK;
|
||||
$gui.set<Label>(goal, {msg, 30});
|
||||
|
||||
$hp_bar = $gui.entity("hp_bar");
|
||||
$gui.set<Meter>($hp_bar, {1.0f, {10, ColorValue::LIGHT_DARK}});
|
||||
$gui.set<Meter>($hp_bar, {});
|
||||
|
||||
$gui.init();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue