Skip to content

Commit

Permalink
imgui 1.90.6 -> 1.91.6
Browse files Browse the repository at this point in the history
  • Loading branch information
briaguya-ai committed Jan 10, 2025
1 parent 3e46fe7 commit f226cf2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmake/dependencies/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set(sdl_apply_patch_if_needed git apply ${sdl_gamepad_patch_file} ${git_hide_out
FetchContent_Declare(
ImGui
GIT_REPOSITORY https://github.com/ocornut/imgui.git
GIT_TAG v1.90.6-docking
GIT_TAG v1.91.6-docking
PATCH_COMMAND ${sdl_apply_patch_if_needed}
)
FetchContent_MakeAvailable(ImGui)
Expand Down
6 changes: 3 additions & 3 deletions src/window/gui/ConsoleWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,12 @@ void ConsoleWindow::DrawElement() {
ImGui::PushStyleColor(ImGuiCol_FrameBgActive, ImVec4(.3f, .3f, .3f, 1.0f));
if (ImGui::BeginTable("History", 1)) {

if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) {
if (ImGui::IsKeyPressed(ImGuiKey_DownArrow)) {
if (mSelectedId < (int32_t)mLog.size() - 1) {
++mSelectedId;
}
}
if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow))) {
if (ImGui::IsKeyPressed(ImGuiKey_UpArrow)) {
if (mSelectedId > 0) {
--mSelectedId;
}
Expand All @@ -415,7 +415,7 @@ void ConsoleWindow::DrawElement() {
std::find(mSelectedEntries.begin(), mSelectedEntries.end(), i) != mSelectedEntries.end();
ImGui::PushStyleColor(ImGuiCol_Text, mPriorityColours[line.Priority]);
if (ImGui::Selectable(id.c_str(), isSelected)) {
if (ImGui::IsKeyDown(ImGui::GetKeyIndex(ImGuiKey_LeftCtrl)) && !isSelected) {
if (ImGui::IsKeyDown(ImGuiKey_LeftCtrl) && !isSelected) {
mSelectedEntries.push_back(i);

} else {
Expand Down
6 changes: 3 additions & 3 deletions src/window/gui/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ void Gui::DrawGame() {
}
if (gfxFramebuffer) {
ImGui::SetCursorPos(pos);
ImGui::Image(reinterpret_cast<ImTextureID>(gfxFramebuffer), size);
ImGui::Image((ImTextureID)gfxFramebuffer, size);
}

ImGui::End();
Expand Down Expand Up @@ -734,7 +734,7 @@ ImTextureID Gui::GetTextureById(int32_t id) {
}
#endif

return reinterpret_cast<ImTextureID>(id);
return (ImTextureID)id;
}

bool Gui::HasTextureByName(const std::string& name) {
Expand All @@ -743,7 +743,7 @@ bool Gui::HasTextureByName(const std::string& name) {

ImTextureID Gui::GetTextureByName(const std::string& name) {
if (!Gui::HasTextureByName(name)) {
return nullptr;
return (ImTextureID)nullptr;
}
return GetTextureById(mGuiTextures[name].RendererTextureId);
}
Expand Down

0 comments on commit f226cf2

Please sign in to comment.