Update Poolbox with FontWriter changes

This commit is contained in:
Jaby 2024-01-05 12:33:31 -06:00
parent 5d370d40e1
commit 50e13df1c7
5 changed files with 10 additions and 10 deletions

View File

@ -103,13 +103,13 @@ namespace ControllerTest {
const auto left_stick = controller->get_left_stick_pos();
const auto right_stick = controller->get_right_stick_pos();
auto cursor = State::create(offset_point.move(16, 0), 0);
auto cursor = Cursor::create(offset_point.move(16, 0), 0);
font_writer.write(cursor, "Right: %i, %i\nLeft : %i, %i\n", right_stick.x, right_stick.y, left_stick.x, left_stick.y);
font_writer.write(cursor, "[%s]", get_type_name(static_cast<Periphery::ControllerType>(controller->get_type())));
}
else {
auto cursor = State::create(Make::PositionI16(cur_arrow_poly[3]->vertex0.x, cur_button_sprts[0]->position.y), 0);
auto cursor = Cursor::create(Make::PositionI16(cur_arrow_poly[3]->vertex0.x, cur_button_sprts[0]->position.y), 0);
font_writer.write(cursor, "!!This Port is not\nenabled in JabyEngine!!", GPU::Color24::Red());
this->tex_page[GPU::update_id()].terminate();
}

View File

@ -24,12 +24,12 @@ namespace FontWriter {
timer.reset();
}
State update(const GPU::PositionI16& start) {
Cursor update(const GPU::PositionI16& start) {
if(timer.is_expired_for(50_ms)) {
timer.reset();
wiggle_count++;
}
return State::create(start, wiggle_count);
return Cursor::create(start, wiggle_count);
}
}

View File

@ -10,5 +10,5 @@ namespace FontWriter {
extern JabyEngine::FontWriter bios_font_writer;
void setup();
State update(const GPU::PositionI16& start);
Cursor update(const GPU::PositionI16& start);
}

View File

@ -28,7 +28,7 @@ namespace Menu {
SimpleMenu::setup(callback, entries, N);
}
void update(JabyEngine::FontWriter& font_writer, State& cursor, const GPU::PositionI16& start);
void update(JabyEngine::FontWriter& font_writer, Cursor& cursor, const GPU::PositionI16& start);
};
class BackMenu {

View File

@ -11,7 +11,7 @@ namespace Menu {
this->cur_selection = 0;
}
void SimpleMenu :: update(JabyEngine::FontWriter& font_writer, State& cursor, const GPU::PositionI16& start) {
void SimpleMenu :: update(JabyEngine::FontWriter& font_writer, Cursor& cursor, const GPU::PositionI16& start) {
const auto& controller = Periphery::get_primary_controller_as<JabyEngine::Periphery::GenericController>();
if(controller.button.went_down(DigitalButton::Up) && this->cur_selection > 0) {
@ -62,8 +62,8 @@ namespace Menu {
}
if(this->waiting) {
auto state = JabyEngine::State::create(position);
this->font_writer->write(state, "Press and hold ()\nto get back", GPU::Color24::Red(0xD0));
auto cursor = JabyEngine::Cursor::create(position);
this->font_writer->write(cursor, "Press and hold ()\nto get back", GPU::Color24::Red(0xD0));
}
else if(auto_clear) {