A barely working tool to find font characters and pick their color.

This commit is contained in:
Zed A. Shaw 2024-12-07 13:42:30 -05:00
parent 6b3ce5eb3d
commit 0edd948101
17 changed files with 406 additions and 72 deletions

16
gui.cpp
View file

@ -21,9 +21,7 @@
#include "events.hpp"
#include "render.hpp"
#include "save.hpp"
const int MAX_FONT_SIZE = 140;
const int MIN_FONT_SIZE = 20;
#include "constants.hpp"
using std::string;
using namespace fmt;
@ -210,13 +208,11 @@ bool GUI::handle_ui_events() {
$status_ui.$component->OnEvent(Event::Return);
}
} else if(MOUSE::isButtonPressed(MOUSE::Left)) {
Point pos = $renderer.mouse_position();
Mouse mev{
.button=Mouse::Button::Left,
.x=int(pos.x), .y=int(pos.y)
};
$status_ui.$component->OnEvent(Event::Mouse("", mev));
Point pos;
if($renderer.mouse_position($status_ui, pos)) {
$status_ui.mouse_click(Mouse::Button::Left, pos);
event_happened = true;
}
}
}