Fixed up dbc.cpp so now just use it everywhere. I next need to find a way to pass that to format automatically.
This commit is contained in:
parent
2baa044695
commit
a6d83db20c
10 changed files with 25 additions and 21 deletions
|
@ -67,7 +67,9 @@ namespace gui {
|
|||
auto button = $status.entity(name);
|
||||
$status.set<Rectangle>(button, {});
|
||||
$status.set<Clickable>(button, {
|
||||
[this, name](auto, auto){ fmt::println("STATUS: {}", name); }
|
||||
[this, name](auto, auto){
|
||||
dbc::log(fmt::format("STATUS: {}", name));
|
||||
}
|
||||
});
|
||||
if(name == "main_status") {
|
||||
$status.set<Textual>(button, {fmt::format("HP: {}", $combat.hp)});
|
||||
|
@ -80,7 +82,9 @@ namespace gui {
|
|||
for(auto& [name, cell] : $overlay.cells()) {
|
||||
auto region = $overlay.entity(name);
|
||||
$overlay.set<Clickable>(region, {
|
||||
[this, name](auto, auto){ fmt::println("OVERLAY: {}", name); }
|
||||
[this, name](auto, auto){
|
||||
dbc::log(fmt::format("OVERLAY: {}", name));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -136,7 +140,7 @@ namespace gui {
|
|||
|
||||
bool BossFightUI::mouse(float x, float y) {
|
||||
if($status.mouse(x, y)) {
|
||||
fmt::println("STATUS");
|
||||
dbc::log("STATUS button pressed");
|
||||
}
|
||||
|
||||
if($overlay.mouse(x, y)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue