diff --git a/cmake/imgui.cmake b/cmake/imgui.cmake index bf251be0..c0ce6c1c 100644 --- a/cmake/imgui.cmake +++ b/cmake/imgui.cmake @@ -12,11 +12,6 @@ file(GLOB IMGUI_FILE_DLG_SOURCES ${IMGUI_FILE_DLG_PATH}/*.cpp) add_library("ImGuiFileDialog" STATIC ${IMGUI_FILE_DLG_SOURCES}) target_include_directories(ImGuiFileDialog PUBLIC ${IMGUI_PATH} ${CMAKE_SOURCE_DIR}/src/lib) -set(IMGUI_COLOR_TEXT_EDIT_PATH ${CMAKE_SOURCE_DIR}/src/lib/ImGuiColorTextEdit) -file(GLOB IMGUI_COLOR_TEXT_EDIT_SOURCES ${IMGUI_COLOR_TEXT_EDIT_PATH}/*.cpp) -add_library("ImGuiColorTextEdit" STATIC ${IMGUI_COLOR_TEXT_EDIT_SOURCES}) -target_include_directories(ImGuiColorTextEdit PUBLIC ${IMGUI_PATH} ${CMAKE_SOURCE_DIR}/src/lib) - set(IMGUI_TEST_ENGINE_PATH ${CMAKE_SOURCE_DIR}/src/lib/imgui_test_engine/imgui_test_engine) file(GLOB IMGUI_TEST_ENGINE_SOURCES ${IMGUI_TEST_ENGINE_PATH}/*.cpp) add_library("ImGuiTestEngine" STATIC ${IMGUI_TEST_ENGINE_SOURCES}) @@ -33,7 +28,6 @@ set( ${IMGUI_PATH}/backends/imgui_impl_sdlrenderer2.cpp ${IMGUI_PATH}/misc/cpp/imgui_stdlib.cpp ${IMGUI_FILE_DLG_PATH}/ImGuiFileDialog.cpp - ${IMGUI_COLOR_TEXT_EDIT_PATH}/TextEditor.cpp ) # For integration test diff --git a/src/app/editor/code/assembly_editor.cc b/src/app/editor/code/assembly_editor.cc index 42374f93..a7e66b8d 100644 --- a/src/app/editor/code/assembly_editor.cc +++ b/src/app/editor/code/assembly_editor.cc @@ -1,10 +1,10 @@ #include "assembly_editor.h" -#include "ImGuiColorTextEdit/TextEditor.h" #include "ImGuiFileDialog/ImGuiFileDialog.h" #include "absl/strings/str_cat.h" #include "app/core/platform/file_dialog.h" #include "app/gui/icons.h" +#include "app/gui/modules/text_editor.h" namespace yaze { namespace editor { diff --git a/src/app/editor/code/assembly_editor.h b/src/app/editor/code/assembly_editor.h index 29869722..0a1cc5af 100644 --- a/src/app/editor/code/assembly_editor.h +++ b/src/app/editor/code/assembly_editor.h @@ -3,9 +3,9 @@ #include -#include "ImGuiColorTextEdit/TextEditor.h" #include "app/core/common.h" #include "app/editor/editor.h" +#include "app/gui/modules/text_editor.h" #include "app/gui/style.h" namespace yaze { diff --git a/src/app/editor/dungeon/dungeon_editor.cc b/src/app/editor/dungeon/dungeon_editor.cc index fbd4fa36..975e0410 100644 --- a/src/app/editor/dungeon/dungeon_editor.cc +++ b/src/app/editor/dungeon/dungeon_editor.cc @@ -834,5 +834,4 @@ void DungeonEditor::DrawUsageGrid() { } } // namespace editor - } // namespace yaze diff --git a/src/app/gui/gui.cmake b/src/app/gui/gui.cmake index 60481956..e3d99d9a 100644 --- a/src/app/gui/gui.cmake +++ b/src/app/gui/gui.cmake @@ -1,6 +1,7 @@ set( YAZE_GUI_SRC app/gui/modules/asset_browser.cc + app/gui/modules/text_editor.cc app/gui/canvas.cc app/gui/input.cc app/gui/style.cc diff --git a/src/app/gui/style.h b/src/app/gui/style.h index 91375e79..d21a7144 100644 --- a/src/app/gui/style.h +++ b/src/app/gui/style.h @@ -4,10 +4,10 @@ #include #include -#include "ImGuiColorTextEdit/TextEditor.h" #include "absl/strings/string_view.h" #include "app/gfx/bitmap.h" #include "app/gui/color.h" +#include "app/gui/modules/text_editor.h" #include "imgui/imgui.h" namespace yaze { @@ -96,7 +96,7 @@ struct MultiSelectWithClipper { clipper.Begin(ITEMS_COUNT); if (ms_io->RangeSrcItem != -1) clipper.IncludeItemByIndex( - (int)ms_io->RangeSrcItem); // Ensure RangeSrc item is not clipped. + (int)ms_io->RangeSrcItem); // Ensure RangeSrc item is not clipped. while (clipper.Step()) { for (int n = clipper.DisplayStart; n < clipper.DisplayEnd; n++) { char label[64]; @@ -116,7 +116,7 @@ struct MultiSelectWithClipper { } }; -} // namespace gui -} // namespace yaze +} // namespace gui +} // namespace yaze #endif