From 5435a055bde131e500e5b59899ecc5e894304b84 Mon Sep 17 00:00:00 2001 From: quou Date: Wed, 1 Jan 2025 10:36:50 +1100 Subject: remove debugger thing --- debugger.cpp | 74 ------------------------------------------------------------ 1 file changed, 74 deletions(-) delete mode 100644 debugger.cpp (limited to 'debugger.cpp') diff --git a/debugger.cpp b/debugger.cpp deleted file mode 100644 index 6cda856..0000000 --- a/debugger.cpp +++ /dev/null @@ -1,74 +0,0 @@ -#include "debugger.hpp" -extern "C" { -#include "plat.h" -} - -struct Vram_Debugger : UI::Modal { - UI::Element* enable_btn; - - Vram_Debugger(UI* ui, UI::Element* parent): - UI::Modal(ui, parent, "VRAM debugger") { - } -}; - -struct Device_Debugger : UI::Modal { - UI::Element* enable_btn; - - Device_Debugger(UI* ui, UI::Element* parent): - UI::Modal(ui, parent, "Device debugger") { - } -}; - -void create_vram_debugger( - UI* ui, - UI::Element* parent, - UI::Element* button -) { - auto window = ui->create_element(parent); - window->enable_btn = button; - window->handler = [](UI::Element* e, const UI::Message& m) { - if (m.type == UI::Message::Type::destroy) { - auto window = (Vram_Debugger*)e; - window->enable_btn->enable(); - } - return 0; - }; - ui->create_element(window->contents, "Hello, I'm the VRAM debugger!"); -} - -void create_device_debugger( - UI* ui, - UI::Element* parent, - UI::Element* button -) { - auto window = ui->create_element(parent); - window->enable_btn = button; - window->handler = [](UI::Element* e, const UI::Message& m) { - if (m.type == UI::Message::Type::destroy) { - auto window = (Device_Debugger*)e; - window->enable_btn->enable(); - } - return 0; - }; - ui->create_element(window->contents, "Hello, I'm the device debugger!"); -} - -void register_debuggers(UI* ui, UI::Toolbar* toolbar) { - auto btnvram = ui->create_element(toolbar, "VRAM Debugger"); - btnvram->handler = [](UI::Element* e, const UI::Message& m) { - if (m.type == UI::Message::Type::click) { - e->disable(); - create_vram_debugger(e->ui, e->ui->root, e); - } - return 0; - }; - auto btndevice = ui->create_element(toolbar, "Device Debugger"); - btndevice->handler = [](UI::Element* e, const UI::Message& m) { - if (m.type == UI::Message::Type::click) { - e->disable(); - create_device_debugger(e->ui, e->ui->root, e); - } - return 0; - }; -} - -- cgit v1.2.3-54-g00ecf