Build: Use in-tree imgui

Snapshot was taken at commit 5b9d197b7d
This commit is contained in:
Connor McLaughlin 2022-09-03 23:29:12 +10:00 committed by refractionpcsx2
parent c70d833a5e
commit 6ef57bf7d6
9 changed files with 51 additions and 47 deletions

3
.gitmodules vendored
View File

@ -21,9 +21,6 @@
path = 3rdparty/rapidyaml/rapidyaml
url = https://github.com/biojppm/rapidyaml.git
branch = master
[submodule "3rdparty/imgui/imgui"]
path = 3rdparty/imgui/imgui
url = https://github.com/ocornut/imgui.git
[submodule "3rdparty/glslang/glslang"]
path = 3rdparty/glslang/glslang
url = https://github.com/KhronosGroup/glslang.git

View File

@ -1,19 +1,21 @@
add_library(imgui
imgui/imconfig.h
imgui/imgui.cpp
imgui/imgui.h
imgui/imgui_demo.cpp
imgui/imgui_draw.cpp
imgui/imgui_internal.h
imgui/imgui_tables.cpp
imgui/imgui_widgets.cpp
imgui/imstb_rectpack.h
imgui/imstb_textedit.h
imgui/imstb_truetype.h
imgui/misc/cpp/imgui_stdlib.cpp
include/imconfig.h
include/imgui.h
include/imgui_internal.h
include/imgui_stdlib.h
include/imstb_textedit.h
src/imgui.cpp
src/imgui_demo.cpp
src/imgui_draw.cpp
src/imgui_tables.cpp
src/imgui_widgets.cpp
src/imstb_rectpack.h
src/imstb_truetype.h
src/imgui_stdlib.cpp
)
target_include_directories(imgui PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/imgui" "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_include_directories(imgui PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_include_directories(imgui PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src")
# Needed for macOS compile.
set_property(TARGET imgui PROPERTY CXX_STANDARD 17)

@ -1 +0,0 @@
Subproject commit 60bea052a92cbb4a93b221002fdf04f0da3698e1

View File

@ -32,7 +32,7 @@
<ClCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\glad\include;$(ProjectDir)imgui;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\glad\include;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
@ -41,21 +41,21 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClInclude Include="imgui\imconfig.h" />
<ClInclude Include="imgui\imgui.h" />
<ClInclude Include="imgui\imgui_internal.h" />
<ClInclude Include="imgui\imstb_rectpack.h" />
<ClInclude Include="imgui\imstb_textedit.h" />
<ClInclude Include="imgui\imstb_truetype.h" />
<ClInclude Include="imgui\misc\cpp\imgui_stdlib.h" />
<ClInclude Include="include\imconfig.h" />
<ClInclude Include="include\imgui.h" />
<ClInclude Include="include\imgui_internal.h" />
<ClInclude Include="include\imstb_rectpack.h" />
<ClInclude Include="include\imstb_textedit.h" />
<ClInclude Include="include\imstb_truetype.h" />
<ClInclude Include="include\imgui_stdlib.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="imgui\imgui.cpp" />
<ClCompile Include="imgui\imgui_demo.cpp" />
<ClCompile Include="imgui\imgui_draw.cpp" />
<ClCompile Include="imgui\imgui_tables.cpp" />
<ClCompile Include="imgui\imgui_widgets.cpp" />
<ClCompile Include="imgui\misc\cpp\imgui_stdlib.cpp" />
<ClCompile Include="src\imgui.cpp" />
<ClCompile Include="src\imgui_demo.cpp" />
<ClCompile Include="src\imgui_draw.cpp" />
<ClCompile Include="src\imgui_tables.cpp" />
<ClCompile Include="src\imgui_widgets.cpp" />
<ClCompile Include="src\imgui_stdlib.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />

View File

@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClInclude Include="imgui\imconfig.h" />
<ClInclude Include="imgui\imgui.h" />
<ClInclude Include="imgui\imgui_internal.h" />
<ClInclude Include="imgui\imstb_rectpack.h" />
<ClInclude Include="imgui\imstb_textedit.h" />
<ClInclude Include="imgui\imstb_truetype.h" />
<ClInclude Include="imgui\misc\cpp\imgui_stdlib.h" />
<ClInclude Include="include\imconfig.h" />
<ClInclude Include="include\imgui.h" />
<ClInclude Include="include\imgui_internal.h" />
<ClInclude Include="include\imstb_rectpack.h" />
<ClInclude Include="include\imstb_textedit.h" />
<ClInclude Include="include\imstb_truetype.h" />
<ClInclude Include="include\imgui_stdlib.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="imgui\imgui.cpp" />
<ClCompile Include="imgui\imgui_demo.cpp" />
<ClCompile Include="imgui\imgui_draw.cpp" />
<ClCompile Include="imgui\imgui_tables.cpp" />
<ClCompile Include="imgui\imgui_widgets.cpp" />
<ClCompile Include="imgui\misc\cpp\imgui_stdlib.cpp" />
<ClCompile Include="src\imgui.cpp" />
<ClCompile Include="src\imgui_demo.cpp" />
<ClCompile Include="src\imgui_draw.cpp" />
<ClCompile Include="src\imgui_tables.cpp" />
<ClCompile Include="src\imgui_widgets.cpp" />
<ClCompile Include="src\imgui_stdlib.cpp" />
</ItemGroup>
</Project>

View File

@ -4257,6 +4257,12 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
unsigned int c = (unsigned int)io.InputQueueCharacters[n];
if (c == '\t') // Skip Tab, see above.
continue;
if (c == '\b')
{
state->OnKeyPressed(STB_TEXTEDIT_K_BACKSPACE);
continue;
}
if (InputTextFilterCharacter(&c, flags, callback, callback_user_data, ImGuiInputSource_Keyboard))
state->OnKeyPressed((int)c);
}

View File

@ -31,7 +31,7 @@
#include "fmt/core.h"
#include "HostDisplay.h"
#include "imgui_internal.h"
#include "misc/cpp/imgui_stdlib.h"
#include "imgui_stdlib.h"
#include <array>
#include <cmath>
#include <deque>

View File

@ -42,7 +42,7 @@
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\glad\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\cubeb\cubeb\include;$(SolutionDir)3rdparty\cubeb\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\imgui\imgui;$(SolutionDir)3rdparty\imgui\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\imgui\include;$(SolutionDir)3rdparty\imgui\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\libzip;$(SolutionDir)3rdparty\libzip\libzip\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\d3d12memalloc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)3rdparty\zstd\zstd\lib</AdditionalIncludeDirectories>

View File

@ -42,7 +42,7 @@
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\glad\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\cubeb\cubeb\include;$(SolutionDir)3rdparty\cubeb\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\imgui\imgui;$(SolutionDir)3rdparty\imgui\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\imgui\include;$(SolutionDir)3rdparty\imgui\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\simpleini\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\sdl2\include;$(SolutionDir)3rdparty\sdl2\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)3rdparty\libzip;$(SolutionDir)3rdparty\libzip\libzip\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>