mirror of
https://github.com/pound-emu/pound.git
synced 2025-12-12 01:36:57 +00:00
feat(gui): Extract and modularize GUI system from main.cpp
- Create modular GUI architecture with base Panel class - Implement GUIManager to handle window lifecycle and panel management - Add Window wrapper class for SDL3/OpenGL context management - Create specialized panels: - ConsolePanel: Colored log output with timestamps - CPUPanel: CPU debugging with tabs for registers, memory, and disassembly - PerformancePanel: Real-time FPS and frame time monitoring - Apply modern dark theme with purple accents - Add comprehensive menu bar (File, Emulation, View, Tools, Help) - Update CMakeLists.txt to include new gui/ directory structure - Refactor main.cpp to use the new GUI system - Cutom theme on switch colors
This commit is contained in:
parent
22418185f8
commit
2bb666a088
15 changed files with 1099 additions and 121 deletions
36
gui/panels/ConsolePanel.h
Normal file
36
gui/panels/ConsolePanel.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright 2025 Pound Emulator Project. All rights reserved.
|
||||
#pragma once
|
||||
|
||||
#include "../Panel.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <deque>
|
||||
|
||||
namespace Pound::GUI
|
||||
{
|
||||
|
||||
class ConsolePanel : public Panel
|
||||
{
|
||||
public:
|
||||
ConsolePanel();
|
||||
|
||||
void Render() override;
|
||||
void AddLog(const std::string &text);
|
||||
void Clear();
|
||||
|
||||
private:
|
||||
struct LogEntry
|
||||
{
|
||||
std::string text;
|
||||
ImVec4 color;
|
||||
};
|
||||
|
||||
std::deque<LogEntry> log_buffer;
|
||||
bool auto_scroll = true;
|
||||
bool show_timestamps = true;
|
||||
static constexpr size_t MAX_LOG_ENTRIES = 1000;
|
||||
|
||||
ImVec4 GetLogColor(const std::string &text) const;
|
||||
};
|
||||
|
||||
} // namespace Pound::GUI
|
||||
Loading…
Add table
Add a link
Reference in a new issue