refactor(render): replace UI shaders with image shaders and Image widget

This commit is contained in:
2026-07-11 14:54:08 +08:00
parent 09653c318a
commit 2d28488126
19 changed files with 213 additions and 127 deletions

View File

@@ -21,22 +21,22 @@ void DebugCollector::init_text() {
#else
version.append("-release");
#endif
version_text.set_position(0.0f, 100.0f)
.set_scale(0.8f)
.set_color(Color::WHITE)
.set_text(version);
version_text.set_color(Color::WHITE)
.set_text(version)
.set_position(0.0f, 100.0f)
.set_scale(0.8f);
m_component.try_emplace(version_text.id(), &version_text);
// fps
auto& fps_text = m_widget.add_child<Label>("fps");
fps_text.set_position(0.0f, 50.0f).set_text("FPS: 0");
fps_text.set_text("FPS: 0").set_position(0.0f, 50.0f);
m_component.try_emplace(fps_text.id(), &fps_text);
// player_pos
auto& player_pos_text = m_widget.add_child<Label>("player_pos");
player_pos_text.set_position(0.0f, 150.0f)
.set_scale(0.8f)
.set_text("x: 0.00 y: 0.00 z: 0.00");
player_pos_text.set_text("x: 0.00 y: 0.00 z: 0.00")
.set_position(0.0f, 150.0f)
.set_scale(0.8f);
m_component.try_emplace(player_pos_text.id(), &player_pos_text);
// rendered_chunk