mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 09:31:08 +08:00
[imgui]: Update to 1.91.5 (#42244)
This commit is contained in:
parent
5b55679a99
commit
ab65510cb3
@ -8,6 +8,7 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-upw.patch
|
||||
use-new-imguiimagebutton.patch # Upstream commit: https://github.com/pthom/hello_imgui/commit/3ba369ad5b9bc281f01a2b2ee78d64ecef7d632a
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
|
28
ports/hello-imgui/use-new-imguiimagebutton.patch
Normal file
28
ports/hello-imgui/use-new-imguiimagebutton.patch
Normal file
@ -0,0 +1,28 @@
|
||||
diff --git a/src/hello_imgui/internal/image_from_asset.cpp b/src/hello_imgui/internal/image_from_asset.cpp
|
||||
index 7416a69..b838d88 100644
|
||||
--- a/src/hello_imgui/internal/image_from_asset.cpp
|
||||
+++ b/src/hello_imgui/internal/image_from_asset.cpp
|
||||
@@ -116,7 +116,7 @@ namespace HelloImGui
|
||||
auto textureId = cachedImage->TextureID();
|
||||
auto imageSize = ImVec2((float)cachedImage->Width, (float)cachedImage->Height);
|
||||
ImVec2 displayedSize = ImageProportionalSize(size, imageSize);
|
||||
- bool clicked = ImGui::ImageButton(textureId, displayedSize, uv0, uv1, frame_padding, bg_col, tint_col);
|
||||
+ bool clicked = ImGui::ImageButton(assetPath, textureId, displayedSize, uv0, uv1, bg_col, tint_col);
|
||||
return clicked;
|
||||
}
|
||||
|
||||
diff --git a/src/hello_imgui/internal/image_gl_deprecated.cpp b/src/hello_imgui/internal/image_gl_deprecated.cpp
|
||||
index 5c66c24..98d21d5 100644
|
||||
--- a/src/hello_imgui/internal/image_gl_deprecated.cpp
|
||||
+++ b/src/hello_imgui/internal/image_gl_deprecated.cpp
|
||||
@@ -67,7 +67,9 @@ bool ImageGl::DrawButton(
|
||||
const ImVec4& tint_col)
|
||||
{
|
||||
ImVec2 displayedSize = ImageProportionalSize(size, this->imageSize);
|
||||
- return ImGui::ImageButton(this->imTextureId, displayedSize, uv0, uv1, frame_padding, bg_col, tint_col);
|
||||
+ char str_id[64];
|
||||
+ snprintf(str_id, 64, "ImageButton_%p", this->imTextureId);
|
||||
+ return ImGui::ImageButton(str_id, this->imTextureId, displayedSize, uv0, uv1, bg_col, tint_col);
|
||||
}
|
||||
|
||||
ImageGlPtr ImageGl::FactorImage(const char *assetPath)
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "hello-imgui",
|
||||
"version": "1.5.2",
|
||||
"port-version": 1,
|
||||
"description": "Hello ImGui: unleash your creativity in app development and prototyping",
|
||||
"homepage": "https://pthom.github.io/hello_imgui/",
|
||||
"license": "MIT",
|
||||
|
@ -8,6 +8,7 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-vec2-math-operators.patch
|
||||
remove-getkeyindex.patch # GetKeyIndex() is a no-op since 1.87; see https://github.com/ocornut/imgui/issues/5979#issuecomment-1345349492
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
|
72
ports/imgui-node-editor/remove-getkeyindex.patch
Normal file
72
ports/imgui-node-editor/remove-getkeyindex.patch
Normal file
@ -0,0 +1,72 @@
|
||||
diff --git a/imgui_node_editor.cpp b/imgui_node_editor.cpp
|
||||
index 1d2bb06..f70d099 100644
|
||||
--- a/imgui_node_editor.cpp
|
||||
+++ b/imgui_node_editor.cpp
|
||||
@@ -60,6 +60,7 @@ namespace Detail {
|
||||
|
||||
DECLARE_KEY_TESTER(ImGuiKey_F);
|
||||
DECLARE_KEY_TESTER(ImGuiKey_D);
|
||||
+DECLARE_KEY_TESTER(ImGuiKey_Delete);
|
||||
|
||||
static inline int GetKeyIndexForF()
|
||||
{
|
||||
@@ -70,6 +71,11 @@ static inline int GetKeyIndexForD()
|
||||
{
|
||||
return KeyTester_ImGuiKey_D::Get<ImGuiKey_>(nullptr);
|
||||
}
|
||||
+
|
||||
+static inline int GetKeyIndexForDelete()
|
||||
+{
|
||||
+ return KeyTester_ImGuiKey_Delete::Get<ImGuiKey_>(nullptr);
|
||||
+}
|
||||
# else
|
||||
static inline ImGuiKey GetKeyIndexForF()
|
||||
{
|
||||
@@ -80,6 +86,11 @@ static inline ImGuiKey GetKeyIndexForD()
|
||||
{
|
||||
return ImGuiKey_D;
|
||||
}
|
||||
+
|
||||
+static inline ImGuiKey GetKeyIndexForDelete()
|
||||
+{
|
||||
+ return ImGuiKey_Delete;
|
||||
+}
|
||||
# endif
|
||||
|
||||
} // namespace Detail
|
||||
@@ -4391,6 +4402,7 @@ ed::EditorAction::AcceptResult ed::ShortcutAction::Accept(const Control& control
|
||||
Action candidateAction = None;
|
||||
|
||||
auto& io = ImGui::GetIO();
|
||||
+# if !defined(IMGUI_VERSION_NUM) || (IMGUI_VERSION_NUM < 18822)
|
||||
if (io.KeyCtrl && !io.KeyShift && !io.KeyAlt && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_X)))
|
||||
candidateAction = Cut;
|
||||
if (io.KeyCtrl && !io.KeyShift && !io.KeyAlt && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_C)))
|
||||
@@ -4401,6 +4413,18 @@ ed::EditorAction::AcceptResult ed::ShortcutAction::Accept(const Control& control
|
||||
candidateAction = Duplicate;
|
||||
if (!io.KeyCtrl && !io.KeyShift && !io.KeyAlt && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Space)))
|
||||
candidateAction = CreateNode;
|
||||
+# else
|
||||
+ if (io.KeyCtrl && !io.KeyShift && !io.KeyAlt && ImGui::IsKeyPressed(ImGuiKey_X))
|
||||
+ candidateAction = Cut;
|
||||
+ if (io.KeyCtrl && !io.KeyShift && !io.KeyAlt && ImGui::IsKeyPressed(ImGuiKey_C))
|
||||
+ candidateAction = Copy;
|
||||
+ if (io.KeyCtrl && !io.KeyShift && !io.KeyAlt && ImGui::IsKeyPressed(ImGuiKey_V))
|
||||
+ candidateAction = Paste;
|
||||
+ if (io.KeyCtrl && !io.KeyShift && !io.KeyAlt && ImGui::IsKeyPressed(GetKeyIndexForD()))
|
||||
+ candidateAction = Duplicate;
|
||||
+ if (!io.KeyCtrl && !io.KeyShift && !io.KeyAlt && ImGui::IsKeyPressed(ImGuiKey_Space))
|
||||
+ candidateAction = CreateNode;
|
||||
+# endif
|
||||
|
||||
if (candidateAction != None)
|
||||
{
|
||||
@@ -4953,7 +4977,7 @@ ed::EditorAction::AcceptResult ed::DeleteItemsAction::Accept(const Control& cont
|
||||
return False;
|
||||
|
||||
auto& io = ImGui::GetIO();
|
||||
- if (Editor->CanAcceptUserInput() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Delete)) && Editor->AreShortcutsEnabled())
|
||||
+ if (Editor->CanAcceptUserInput() && ImGui::IsKeyPressed(GetKeyIndexForDelete()) && Editor->AreShortcutsEnabled())
|
||||
{
|
||||
auto& selection = Editor->GetSelectedObjects();
|
||||
if (!selection.empty())
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "imgui-node-editor",
|
||||
"version": "0.9.3",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "Node Editor built using Dear ImGui",
|
||||
"homepage": "https://github.com/thedmd/imgui-node-editor",
|
||||
"license": "MIT",
|
||||
|
58
ports/imgui-sfml/0002-clean-deprecated-api.patch
Normal file
58
ports/imgui-sfml/0002-clean-deprecated-api.patch
Normal file
@ -0,0 +1,58 @@
|
||||
diff --git a/imgui-SFML.cpp b/imgui-SFML.cpp
|
||||
index d9c4f52..6ae99c1 100644
|
||||
--- a/imgui-SFML.cpp
|
||||
+++ b/imgui-SFML.cpp
|
||||
@@ -867,36 +867,9 @@ void SetJoystickRTriggerThreshold(float threshold) {
|
||||
|
||||
void SetJoystickMapping(int key, unsigned int joystickButton) {
|
||||
assert(s_currWindowCtx);
|
||||
- // This function now expects ImGuiKey_* values.
|
||||
- // For partial backwards compatibility, also expect some ImGuiNavInput_* values.
|
||||
- ImGuiKey finalKey;
|
||||
- switch (key) {
|
||||
- case ImGuiNavInput_Activate:
|
||||
- finalKey = ImGuiKey_GamepadFaceDown;
|
||||
- break;
|
||||
- case ImGuiNavInput_Cancel:
|
||||
- finalKey = ImGuiKey_GamepadFaceRight;
|
||||
- break;
|
||||
- case ImGuiNavInput_Input:
|
||||
- finalKey = ImGuiKey_GamepadFaceUp;
|
||||
- break;
|
||||
- case ImGuiNavInput_Menu:
|
||||
- finalKey = ImGuiKey_GamepadFaceLeft;
|
||||
- break;
|
||||
- case ImGuiNavInput_FocusPrev:
|
||||
- case ImGuiNavInput_TweakSlow:
|
||||
- finalKey = ImGuiKey_GamepadL1;
|
||||
- break;
|
||||
- case ImGuiNavInput_FocusNext:
|
||||
- case ImGuiNavInput_TweakFast:
|
||||
- finalKey = ImGuiKey_GamepadR1;
|
||||
- break;
|
||||
- default:
|
||||
- assert(key >= ImGuiKey_NamedKey_BEGIN && key < ImGuiKey_NamedKey_END);
|
||||
- finalKey = static_cast<ImGuiKey>(key);
|
||||
- }
|
||||
+ assert(key >= ImGuiKey_NamedKey_BEGIN && key < ImGuiKey_NamedKey_END);
|
||||
assert(joystickButton < sf::Joystick::ButtonCount);
|
||||
- s_currWindowCtx->joystickMapping[joystickButton] = finalKey;
|
||||
+ s_currWindowCtx->joystickMapping[joystickButton] = static_cast<ImGuiKey>(key);
|
||||
}
|
||||
|
||||
void SetDPadXAxis(sf::Joystick::Axis dPadXAxis, bool inverted) {
|
||||
@@ -1228,11 +1201,11 @@ void RenderDrawLists(ImDrawData* draw_data) {
|
||||
const ImDrawVert* vtx_buffer = cmd_list->VtxBuffer.Data;
|
||||
const ImDrawIdx* idx_buffer = cmd_list->IdxBuffer.Data;
|
||||
glVertexPointer(2, GL_FLOAT, sizeof(ImDrawVert),
|
||||
- (const GLvoid*)((const char*)vtx_buffer + IM_OFFSETOF(ImDrawVert, pos)));
|
||||
+ (const GLvoid*)((const char*)vtx_buffer + offsetof(ImDrawVert, pos)));
|
||||
glTexCoordPointer(2, GL_FLOAT, sizeof(ImDrawVert),
|
||||
- (const GLvoid*)((const char*)vtx_buffer + IM_OFFSETOF(ImDrawVert, uv)));
|
||||
+ (const GLvoid*)((const char*)vtx_buffer + offsetof(ImDrawVert, uv)));
|
||||
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(ImDrawVert),
|
||||
- (const GLvoid*)((const char*)vtx_buffer + IM_OFFSETOF(ImDrawVert, col)));
|
||||
+ (const GLvoid*)((const char*)vtx_buffer + offsetof(ImDrawVert, col)));
|
||||
|
||||
for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++) {
|
||||
const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
|
111
ports/imgui-sfml/0003-use-explicit-id.patch
Normal file
111
ports/imgui-sfml/0003-use-explicit-id.patch
Normal file
@ -0,0 +1,111 @@
|
||||
diff --git a/imgui-SFML.cpp b/imgui-SFML.cpp
|
||||
index 6ae99c1..069fdeb 100644
|
||||
--- a/imgui-SFML.cpp
|
||||
+++ b/imgui-SFML.cpp
|
||||
@@ -984,49 +984,30 @@ void Image(const sf::Sprite& sprite, const sf::Vector2f& size, const sf::Color&
|
||||
|
||||
/////////////// Image Button Overloads for sf::Texture
|
||||
|
||||
-bool ImageButton(const sf::Texture& texture, const int framePadding, const sf::Color& bgColor,
|
||||
- const sf::Color& tintColor) {
|
||||
- return ImageButton(texture, static_cast<sf::Vector2f>(texture.getSize()), framePadding, bgColor,
|
||||
- tintColor);
|
||||
-}
|
||||
-
|
||||
-bool ImageButton(const sf::Texture& texture, const sf::Vector2f& size, const int framePadding,
|
||||
+bool ImageButton(const char* id, const sf::Texture& texture, const sf::Vector2f& size,
|
||||
const sf::Color& bgColor, const sf::Color& tintColor) {
|
||||
ImTextureID textureID = convertGLTextureHandleToImTextureID(texture.getNativeHandle());
|
||||
|
||||
- return ImGui::ImageButton(textureID, ImVec2(size.x, size.y), ImVec2(0, 0), ImVec2(1, 1),
|
||||
- framePadding, toImColor(bgColor), toImColor(tintColor));
|
||||
+ return ImGui::ImageButton(id, textureID, ImVec2(size.x, size.y), ImVec2(0, 0), ImVec2(1, 1),
|
||||
+ toImColor(bgColor), toImColor(tintColor));
|
||||
}
|
||||
|
||||
/////////////// Image Button Overloads for sf::RenderTexture
|
||||
|
||||
-bool ImageButton(const sf::RenderTexture& texture, const int framePadding, const sf::Color& bgColor,
|
||||
- const sf::Color& tintColor) {
|
||||
- return ImageButton(texture, static_cast<sf::Vector2f>(texture.getSize()), framePadding, bgColor,
|
||||
- tintColor);
|
||||
-}
|
||||
-
|
||||
-bool ImageButton(const sf::RenderTexture& texture, const sf::Vector2f& size, const int framePadding,
|
||||
+bool ImageButton(const char* id, const sf::RenderTexture& texture, const sf::Vector2f& size,
|
||||
const sf::Color& bgColor, const sf::Color& tintColor) {
|
||||
ImTextureID textureID =
|
||||
convertGLTextureHandleToImTextureID(texture.getTexture().getNativeHandle());
|
||||
|
||||
- return ImGui::ImageButton(textureID, ImVec2(size.x, size.y), ImVec2(0, 1),
|
||||
+ return ImGui::ImageButton(id, textureID, ImVec2(size.x, size.y), ImVec2(0, 1),
|
||||
ImVec2(1, 0), // flipped vertically, because textures in
|
||||
// sf::RenderTexture are stored this way
|
||||
- framePadding, toImColor(bgColor), toImColor(tintColor));
|
||||
+ toImColor(bgColor), toImColor(tintColor));
|
||||
}
|
||||
|
||||
/////////////// Image Button Overloads for sf::Sprite
|
||||
|
||||
-bool ImageButton(const sf::Sprite& sprite, const int framePadding, const sf::Color& bgColor,
|
||||
- const sf::Color& tintColor) {
|
||||
- sf::FloatRect spriteSize = sprite.getGlobalBounds();
|
||||
- return ImageButton(sprite, sf::Vector2f(spriteSize.width, spriteSize.height), framePadding,
|
||||
- bgColor, tintColor);
|
||||
-}
|
||||
-
|
||||
-bool ImageButton(const sf::Sprite& sprite, const sf::Vector2f& size, const int framePadding,
|
||||
+bool ImageButton(const char* id, const sf::Sprite& sprite, const sf::Vector2f& size,
|
||||
const sf::Color& bgColor, const sf::Color& tintColor) {
|
||||
#if SFML_VERSION_MAJOR >= 3
|
||||
const sf::Texture& texture = sprite.getTexture();
|
||||
@@ -1045,8 +1026,8 @@ bool ImageButton(const sf::Sprite& sprite, const sf::Vector2f& size, const int f
|
||||
(textureRect.top + textureRect.height) / textureSize.y);
|
||||
|
||||
ImTextureID textureID = convertGLTextureHandleToImTextureID(texture.getNativeHandle());
|
||||
- return ImGui::ImageButton(textureID, ImVec2(size.x, size.y), uv0, uv1, framePadding,
|
||||
- toImColor(bgColor), toImColor(tintColor));
|
||||
+ return ImGui::ImageButton(id, textureID, ImVec2(size.x, size.y), uv0, uv1, toImColor(bgColor),
|
||||
+ toImColor(tintColor));
|
||||
}
|
||||
|
||||
/////////////// Draw_list Overloads
|
||||
diff --git a/imgui-SFML.h b/imgui-SFML.h
|
||||
index e431e99..8cce4d6 100644
|
||||
--- a/imgui-SFML.h
|
||||
+++ b/imgui-SFML.h
|
||||
@@ -99,29 +99,19 @@ IMGUI_SFML_API void Image(const sf::Sprite& sprite, const sf::Vector2f& size,
|
||||
const sf::Color& borderColor = sf::Color::Transparent);
|
||||
|
||||
// ImageButton overloads for sf::Texture
|
||||
-IMGUI_SFML_API bool ImageButton(const sf::Texture& texture, const int framePadding = -1,
|
||||
- const sf::Color& bgColor = sf::Color::Transparent,
|
||||
- const sf::Color& tintColor = sf::Color::White);
|
||||
-IMGUI_SFML_API bool ImageButton(const sf::Texture& texture, const sf::Vector2f& size,
|
||||
- const int framePadding = -1,
|
||||
+IMGUI_SFML_API bool ImageButton(const char* id, const sf::Texture& texture,
|
||||
+ const sf::Vector2f& size,
|
||||
const sf::Color& bgColor = sf::Color::Transparent,
|
||||
const sf::Color& tintColor = sf::Color::White);
|
||||
|
||||
// ImageButton overloads for sf::RenderTexture
|
||||
-IMGUI_SFML_API bool ImageButton(const sf::RenderTexture& texture, const int framePadding = -1,
|
||||
- const sf::Color& bgColor = sf::Color::Transparent,
|
||||
- const sf::Color& tintColor = sf::Color::White);
|
||||
-IMGUI_SFML_API bool ImageButton(const sf::RenderTexture& texture, const sf::Vector2f& size,
|
||||
- const int framePadding = -1,
|
||||
+IMGUI_SFML_API bool ImageButton(const char* id, const sf::RenderTexture& texture,
|
||||
+ const sf::Vector2f& size,
|
||||
const sf::Color& bgColor = sf::Color::Transparent,
|
||||
const sf::Color& tintColor = sf::Color::White);
|
||||
|
||||
// ImageButton overloads for sf::Sprite
|
||||
-IMGUI_SFML_API bool ImageButton(const sf::Sprite& sprite, const int framePadding = -1,
|
||||
- const sf::Color& bgColor = sf::Color::Transparent,
|
||||
- const sf::Color& tintColor = sf::Color::White);
|
||||
-IMGUI_SFML_API bool ImageButton(const sf::Sprite& sprite, const sf::Vector2f& size,
|
||||
- const int framePadding = -1,
|
||||
+IMGUI_SFML_API bool ImageButton(const char* id, const sf::Sprite& sprite, const sf::Vector2f& size,
|
||||
const sf::Color& bgColor = sf::Color::Transparent,
|
||||
const sf::Color& tintColor = sf::Color::White);
|
||||
|
@ -8,6 +8,8 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0001-fix_find_package.patch
|
||||
0002-clean-deprecated-api.patch # see https://github.com/SFML/imgui-sfml/pull/305
|
||||
0003-use-explicit-id.patch # see https://github.com/SFML/imgui-sfml/pull/266
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "imgui-sfml",
|
||||
"version": "2.6",
|
||||
"port-version": 1,
|
||||
"description": "ImGui binding for use with SFML",
|
||||
"homepage": "https://github.com/eliasdaler/imgui-sfml",
|
||||
"license": "MIT",
|
||||
|
@ -5,7 +5,7 @@ if ("docking-experimental" IN_LIST FEATURES)
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO ocornut/imgui
|
||||
REF "v${VERSION}-docking"
|
||||
SHA512 07492ef56d0518b1a941d8da6ccb1cfe9a8253db3057f2875a033b144047065f43240e0cb8f4ef5d3cad76ccd84fd26fc673c673f4a484d10d2c8545ec286bdb
|
||||
SHA512 2864672d3b08caf3396f69affe1b83d7977d2300f571864378ebe5b4a1a1b5634e6e171c8870444b7f8947fdc681aeaf07f59b25a290c94059d36226fc7e1aad
|
||||
HEAD_REF docking
|
||||
)
|
||||
else()
|
||||
@ -13,7 +13,7 @@ else()
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO ocornut/imgui
|
||||
REF "v${VERSION}"
|
||||
SHA512 dbf0ce45dc6fb100c02bb4fda3d95e0bed615ae9d91b269ad6f42b11fb5aa6a22ec7649ac8c96eb260bed454db56e975de33cd6ab55fa8b7e249f9c87b07a90e
|
||||
SHA512 85ced14d0c4c3506caf0cff5897dc2c49521fe6de5bcadbc1107e2b63d6bd9a19f967960ba31206187fc2c830246f635e8f2b29b0b1ff522be209dd2a5349529
|
||||
HEAD_REF master
|
||||
)
|
||||
endif()
|
||||
@ -63,7 +63,7 @@ if ("test-engine" IN_LIST FEATURES)
|
||||
OUT_SOURCE_PATH TEST_ENGINE_SOURCE_PATH
|
||||
REPO ocornut/imgui_test_engine
|
||||
REF "v${VERSION}"
|
||||
SHA512 4c4d7fd32504c1a56a5f1816f5032e4390ea9eb5d56c1ee2293950c808e23c1b94df9edf524fcc4122d27fa86d749454862ddb0d1a83633c014fe33f900836b5
|
||||
SHA512 b18d64732629f01eb4153c7f7dbc2184d7ad1d63d0dc1b4f42120209c673f20ebc202bf7bc6ab27ae1a23a9437d40cc9f77c3e100e0e6de3ed6eb0087c41b7a4
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "imgui",
|
||||
"version": "1.91.0",
|
||||
"version": "1.91.5",
|
||||
"description": "Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies.",
|
||||
"homepage": "https://github.com/ocornut/imgui",
|
||||
"license": "MIT",
|
||||
|
@ -1,54 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 27b8bd8..33fe623 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -2,8 +2,8 @@ if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the source code and call cmake from there")
|
||||
endif ()
|
||||
|
||||
-project(sfml-imgui)
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
+project(milerius-sfml-imgui)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
##! Package
|
||||
@@ -26,7 +26,7 @@ include(CMakePackageConfigHelpers)
|
||||
|
||||
install(TARGETS
|
||||
${PROJECT_NAME}
|
||||
- EXPORT sfml-imgui-targets
|
||||
+ EXPORT milerius-sfml-imgui-targets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
@@ -39,7 +39,7 @@ install(EXPORT ${PROJECT_NAME}-targets
|
||||
)
|
||||
|
||||
configure_package_config_file(
|
||||
- "${PROJECT_SOURCE_DIR}/cmake/${PROJECT_NAME}-config.cmake.in"
|
||||
+ "${PROJECT_SOURCE_DIR}/cmake/sfml-imgui-config.cmake.in"
|
||||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
|
||||
INSTALL_DESTINATION lib/cmake/${PROJECT_NAME}
|
||||
)
|
||||
@@ -51,6 +51,6 @@ install(FILES
|
||||
install(DIRECTORY
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sfml-imgui
|
||||
DESTINATION
|
||||
- ${CMAKE_INSTALL_INCLUDEDIR}/sfml-imgui
|
||||
+ ${CMAKE_INSTALL_INCLUDEDIR}/
|
||||
FILES_MATCHING PATTERN "*.h*"
|
||||
)
|
||||
diff --git a/cmake/sfml-imgui-config.cmake.in b/cmake/sfml-imgui-config.cmake.in
|
||||
index cd790be..e1bdd77 100644
|
||||
--- a/cmake/sfml-imgui-config.cmake.in
|
||||
+++ b/cmake/sfml-imgui-config.cmake.in
|
||||
@@ -2,5 +2,5 @@
|
||||
find_package(SFML CONFIG REQUIRED graphics)
|
||||
find_package(imgui CONFIG REQUIRED)
|
||||
find_package(OpenGL REQUIRED)
|
||||
-include("${CMAKE_CURRENT_LIST_DIR}/sfml-imgui-targets.cmake")
|
||||
-check_required_components("sfml-imgui")
|
||||
\ No newline at end of file
|
||||
+include("${CMAKE_CURRENT_LIST_DIR}/milerius-sfml-imgui-targets.cmake")
|
||||
+check_required_components("milerius-sfml-imgui")
|
||||
\ No newline at end of file
|
@ -1,12 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 27b8bd8..ac65300 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -14,6 +14,7 @@ find_package(OpenGL REQUIRED)
|
||||
##! Library
|
||||
add_library(${PROJECT_NAME} SHARED sfml-imgui/imgui-SFML.cpp)
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC imgui::imgui sfml-graphics OpenGL::GL)
|
||||
+target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/sfml-imgui>
|
@ -1,22 +0,0 @@
|
||||
diff --git a/sfml-imgui/imgui-SFML.cpp b/sfml-imgui/imgui-SFML.cpp
|
||||
index 36a1a91..cacc9a8 100644
|
||||
--- a/sfml-imgui/imgui-SFML.cpp
|
||||
+++ b/sfml-imgui/imgui-SFML.cpp
|
||||
@@ -159,7 +159,7 @@ namespace
|
||||
// Returns first id of connected joystick
|
||||
unsigned int getConnectedJoystickId();
|
||||
|
||||
- void updateJoystickActionState(ImGuiIO& io, ImGuiNavInput_ action);
|
||||
+ void updateJoystickActionState(ImGuiIO& io, ImGuiNavInput action);
|
||||
void updateJoystickDPadState(ImGuiIO& io);
|
||||
void updateJoystickLStickState(ImGuiIO& io);
|
||||
}
|
||||
@@ -734,7 +734,7 @@ namespace
|
||||
ImGui::SFML::SetJoytickLStickThreshold(5.f);
|
||||
}
|
||||
|
||||
- void updateJoystickActionState(ImGuiIO& io, ImGuiNavInput_ action)
|
||||
+ void updateJoystickActionState(ImGuiIO& io, ImGuiNavInput action)
|
||||
{
|
||||
bool isPressed = sf::Joystick::isButtonPressed(s_joystickId, s_joystickMapping[action]);
|
||||
io.NavInputs[action] = isPressed ? 1.0f : 0.0f;
|
@ -1,24 +0,0 @@
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Milerius/imgui-sfml-shared
|
||||
REF 1.1
|
||||
SHA512 191184f7b302f643bd7c241b69d9f9edc0d03c6f5a0b3a49f57ac84f3828202f8065291fb17993073a2c07f1237ba491de677c47e2f8160dc70ea77f20eb1946
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
FixFindPackageIssue.patch
|
||||
cpp11.patch
|
||||
fix-imgui-dependency.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/milerius-sfml-imgui)
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
@ -1,20 +0,0 @@
|
||||
{
|
||||
"name": "milerius-sfml-imgui",
|
||||
"version": "1.1",
|
||||
"port-version": 6,
|
||||
"description": "imgui dll for sfml usage",
|
||||
"homepage": "https://github.com/Milerius/imgui-sfml-shared",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
"imgui",
|
||||
"sfml",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
@ -720,7 +720,6 @@ memorymodule:x64-android=fail
|
||||
mesa:x64-linux=fail
|
||||
mesa:x64-osx=fail
|
||||
mesa:arm64-osx=fail
|
||||
milerius-sfml-imgui:x64-windows-static=fail
|
||||
minifb:arm-neon-android=fail
|
||||
minifb:arm64-android=fail
|
||||
minifb:x64-android=fail
|
||||
|
@ -3478,7 +3478,7 @@
|
||||
},
|
||||
"hello-imgui": {
|
||||
"baseline": "1.5.2",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"hexl": {
|
||||
"baseline": "1.2.5",
|
||||
@ -3701,16 +3701,16 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"imgui": {
|
||||
"baseline": "1.91.0",
|
||||
"baseline": "1.91.5",
|
||||
"port-version": 0
|
||||
},
|
||||
"imgui-node-editor": {
|
||||
"baseline": "0.9.3",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"imgui-sfml": {
|
||||
"baseline": "2.6",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"imguizmo": {
|
||||
"baseline": "2024-05-29",
|
||||
@ -5932,10 +5932,6 @@
|
||||
"baseline": "2020-10-06",
|
||||
"port-version": 3
|
||||
},
|
||||
"milerius-sfml-imgui": {
|
||||
"baseline": "1.1",
|
||||
"port-version": 6
|
||||
},
|
||||
"mimalloc": {
|
||||
"baseline": "2.1.7",
|
||||
"port-version": 1
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "27ecee76fa1cedbd63a469064892c8b6f10a4e4f",
|
||||
"version": "1.5.2",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "965296e927e1e09280992d52cd0330ce2c966cc6",
|
||||
"version": "1.5.2",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "446e26cb985e934f08a574f8a5df27fa905655f6",
|
||||
"version": "0.9.3",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "895085c7cb1ad9ebfd27e9a114d222cf063367dd",
|
||||
"version": "0.9.3",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "68bb56897b198937d6aade36289e5f74167bb99d",
|
||||
"version": "2.6",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "534384362159db50f833348914cf01bd8c1fb648",
|
||||
"version": "2.6",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "1b5f147821dea003ee9d733b40bfff23e2c40f04",
|
||||
"version": "1.91.5",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "09b0e91307c74efecc2b8860b3a25f4e11aa96d3",
|
||||
"version": "1.91.0",
|
||||
|
@ -1,39 +0,0 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "96e8f763f41b331a6a7e8706925d8a49931627f1",
|
||||
"version": "1.1",
|
||||
"port-version": 6
|
||||
},
|
||||
{
|
||||
"git-tree": "959aac1b74b20fe931081e70cedd5e82533669fc",
|
||||
"version": "1.1",
|
||||
"port-version": 5
|
||||
},
|
||||
{
|
||||
"git-tree": "4bfc198df4803019e174c0489fcc91e178f66930",
|
||||
"version": "1.1",
|
||||
"port-version": 4
|
||||
},
|
||||
{
|
||||
"git-tree": "ecf4d9fd039390613094ab42564601f32f9982c3",
|
||||
"version-string": "1.1",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "a4143f10f8cf6b5d8d25626961e56fec4cb3c706",
|
||||
"version-string": "1.1-2",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "af7d10ad6b2e69105dc6e7d3407b67bbad2bd8d0",
|
||||
"version-string": "1.1-1",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "1a8cdb6bf3f610b40a412d89e6126af97111c581",
|
||||
"version-string": "1.1",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user