Remove ImGuiColorTextEdit integration and update includes for TextEditor

This commit is contained in:
scawful
2024-12-31 15:25:26 -05:00
parent 9215e4d614
commit 9745e7005c
6 changed files with 7 additions and 13 deletions

View File

@@ -12,11 +12,6 @@ file(GLOB IMGUI_FILE_DLG_SOURCES ${IMGUI_FILE_DLG_PATH}/*.cpp)
add_library("ImGuiFileDialog" STATIC ${IMGUI_FILE_DLG_SOURCES}) add_library("ImGuiFileDialog" STATIC ${IMGUI_FILE_DLG_SOURCES})
target_include_directories(ImGuiFileDialog PUBLIC ${IMGUI_PATH} ${CMAKE_SOURCE_DIR}/src/lib) 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) 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) file(GLOB IMGUI_TEST_ENGINE_SOURCES ${IMGUI_TEST_ENGINE_PATH}/*.cpp)
add_library("ImGuiTestEngine" STATIC ${IMGUI_TEST_ENGINE_SOURCES}) add_library("ImGuiTestEngine" STATIC ${IMGUI_TEST_ENGINE_SOURCES})
@@ -33,7 +28,6 @@ set(
${IMGUI_PATH}/backends/imgui_impl_sdlrenderer2.cpp ${IMGUI_PATH}/backends/imgui_impl_sdlrenderer2.cpp
${IMGUI_PATH}/misc/cpp/imgui_stdlib.cpp ${IMGUI_PATH}/misc/cpp/imgui_stdlib.cpp
${IMGUI_FILE_DLG_PATH}/ImGuiFileDialog.cpp ${IMGUI_FILE_DLG_PATH}/ImGuiFileDialog.cpp
${IMGUI_COLOR_TEXT_EDIT_PATH}/TextEditor.cpp
) )
# For integration test # For integration test

View File

@@ -1,10 +1,10 @@
#include "assembly_editor.h" #include "assembly_editor.h"
#include "ImGuiColorTextEdit/TextEditor.h"
#include "ImGuiFileDialog/ImGuiFileDialog.h" #include "ImGuiFileDialog/ImGuiFileDialog.h"
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
#include "app/core/platform/file_dialog.h" #include "app/core/platform/file_dialog.h"
#include "app/gui/icons.h" #include "app/gui/icons.h"
#include "app/gui/modules/text_editor.h"
namespace yaze { namespace yaze {
namespace editor { namespace editor {

View File

@@ -3,9 +3,9 @@
#include <string> #include <string>
#include "ImGuiColorTextEdit/TextEditor.h"
#include "app/core/common.h" #include "app/core/common.h"
#include "app/editor/editor.h" #include "app/editor/editor.h"
#include "app/gui/modules/text_editor.h"
#include "app/gui/style.h" #include "app/gui/style.h"
namespace yaze { namespace yaze {

View File

@@ -834,5 +834,4 @@ void DungeonEditor::DrawUsageGrid() {
} }
} // namespace editor } // namespace editor
} // namespace yaze } // namespace yaze

View File

@@ -1,6 +1,7 @@
set( set(
YAZE_GUI_SRC YAZE_GUI_SRC
app/gui/modules/asset_browser.cc app/gui/modules/asset_browser.cc
app/gui/modules/text_editor.cc
app/gui/canvas.cc app/gui/canvas.cc
app/gui/input.cc app/gui/input.cc
app/gui/style.cc app/gui/style.cc

View File

@@ -4,10 +4,10 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "ImGuiColorTextEdit/TextEditor.h"
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
#include "app/gfx/bitmap.h" #include "app/gfx/bitmap.h"
#include "app/gui/color.h" #include "app/gui/color.h"
#include "app/gui/modules/text_editor.h"
#include "imgui/imgui.h" #include "imgui/imgui.h"
namespace yaze { namespace yaze {
@@ -96,7 +96,7 @@ struct MultiSelectWithClipper {
clipper.Begin(ITEMS_COUNT); clipper.Begin(ITEMS_COUNT);
if (ms_io->RangeSrcItem != -1) if (ms_io->RangeSrcItem != -1)
clipper.IncludeItemByIndex( 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()) { while (clipper.Step()) {
for (int n = clipper.DisplayStart; n < clipper.DisplayEnd; n++) { for (int n = clipper.DisplayStart; n < clipper.DisplayEnd; n++) {
char label[64]; char label[64];
@@ -116,7 +116,7 @@ struct MultiSelectWithClipper {
} }
}; };
} // namespace gui } // namespace gui
} // namespace yaze } // namespace yaze
#endif #endif