refactor: Organize Canvas Utilities and BPP Format Management
- Moved canvas utility functions into a dedicated `canvas_utils` module for better structure and maintainability. - Introduced a new `BppFormatUI` class for managing BPP format selection and conversion, enhancing the user interface for format management. - Updated CMake configuration to include new source and header files for the canvas utilities and BPP format UI. - Adjusted file paths in the project structure to reflect the new organization, ensuring proper integration across components.
This commit is contained in:
@@ -985,8 +985,8 @@ source_group("Application\\Graphics" FILES
|
||||
|
||||
# GUI System
|
||||
source_group("Application\\GUI" FILES
|
||||
app/gui/canvas_utils.cc
|
||||
app/gui/canvas_utils.h
|
||||
app/gui/canvas/canvas_utils.cc
|
||||
app/gui/canvas/canvas_utils.h
|
||||
app/gui/canvas.cc
|
||||
app/gui/canvas.h
|
||||
app/gui/color.cc
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#include "app/gfx/bpp_format_manager.h"
|
||||
#include "app/gfx/bitmap.h"
|
||||
#include "app/gfx/performance/performance_profiler.h"
|
||||
#include "app/gui/canvas_utils.h"
|
||||
#include "app/gui/style.h"
|
||||
#include "app/gui/canvas/canvas_automation_api.h"
|
||||
#include "canvas/canvas_utils.h"
|
||||
#include "canvas/canvas_automation_api.h"
|
||||
#include "imgui/imgui.h"
|
||||
|
||||
namespace yaze::gui {
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
|
||||
#include "app/gfx/bitmap.h"
|
||||
#include "app/rom.h"
|
||||
#include "app/gui/canvas_utils.h"
|
||||
#include "canvas/canvas_utils.h"
|
||||
#include "app/gui/widgets/palette_widget.h"
|
||||
#include "app/gfx/bpp_format_manager.h"
|
||||
#include "app/gui/bpp_format_ui.h"
|
||||
#include "canvas/bpp_format_ui.h"
|
||||
#include "app/gui/canvas/canvas_modals.h"
|
||||
#include "app/gui/canvas/canvas_context_menu.h"
|
||||
#include "app/gui/canvas/canvas_usage_tracker.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "app/gui/bpp_format_ui.h"
|
||||
#include "bpp_format_ui.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <sstream>
|
||||
@@ -3,19 +3,23 @@
|
||||
|
||||
# Canvas core components
|
||||
set(CANVAS_SOURCES
|
||||
bpp_format_ui.cc
|
||||
canvas_modals.cc
|
||||
canvas_context_menu.cc
|
||||
canvas_usage_tracker.cc
|
||||
canvas_performance_integration.cc
|
||||
canvas_interaction_handler.cc
|
||||
canvas_utils.cc
|
||||
)
|
||||
|
||||
set(CANVAS_HEADERS
|
||||
bpp_format_ui.h
|
||||
canvas_modals.h
|
||||
canvas_context_menu.h
|
||||
canvas_usage_tracker.h
|
||||
canvas_performance_integration.h
|
||||
canvas_interaction_handler.h
|
||||
canvas_utils.h
|
||||
)
|
||||
|
||||
# Create canvas library
|
||||
@@ -43,6 +47,9 @@ target_include_directories(yaze_canvas PUBLIC
|
||||
target_link_libraries(yaze_canvas PUBLIC
|
||||
yaze_gfx
|
||||
yaze_gui_common
|
||||
absl::status
|
||||
absl::statusor
|
||||
absl::strings
|
||||
imgui
|
||||
SDL2::SDL2
|
||||
)
|
||||
|
||||
@@ -6,14 +6,14 @@ set(
|
||||
app/gui/widgets/dungeon_object_emulator_preview.cc
|
||||
app/gui/widgets/collaboration_panel.cc
|
||||
app/gui/canvas.cc
|
||||
app/gui/canvas_utils.cc
|
||||
app/gui/canvas/canvas_utils.cc
|
||||
app/gui/widgets/palette_widget.cc
|
||||
app/gui/widgets/palette_editor_widget.cc
|
||||
app/gui/input.cc
|
||||
app/gui/style.cc
|
||||
app/gui/color.cc
|
||||
app/gui/theme_manager.cc
|
||||
app/gui/bpp_format_ui.cc
|
||||
app/gui/canvas/bpp_format_ui.cc
|
||||
app/gui/widgets/widget_id_registry.cc
|
||||
app/gui/widgets/widget_auto_register.cc
|
||||
app/gui/widgets/widget_state_capture.cc
|
||||
|
||||
Reference in New Issue
Block a user