Skip to content

Commit

Permalink
Examples: Use ImGuiKey directly with ImGui r18822 (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
thedmd committed Nov 3, 2022
1 parent 7f1f855 commit a916e6a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ v0.9.2 (WIP):
Deleting node queue connected links for deletion.

BUGFIX: Examples: Simplify and fix drawing of node header line (#180)

BUGFIX: Editor: Cleanup tabs.

BUGFIX: Editor: Use ImGuiKey directly with ImGui r18822 (#183)

BUGFIX: Examples: Use ImGuiKey directly with ImGui r18822 (#183)


v0.9.1 (2022-08-27):

Expand Down
17 changes: 17 additions & 0 deletions examples/application/source/imgui_extra_keys.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# pragma once
# include <imgui.h>

# if !defined(IMGUI_VERSION_NUM) || (IMGUI_VERSION_NUM < 18822)

# include <type_traits>

// https://stackoverflow.com/a/8597498
Expand Down Expand Up @@ -46,3 +49,17 @@ static inline int GetEnumValueForD()
{
return KeyTester_ImGuiKey_D::Get<ImGuiKey_>(nullptr);
}

# else

static inline ImGuiKey GetEnumValueForF()
{
return ImGuiKey_F;
}

static inline ImGuiKey GetEnumValueForD()
{
return ImGuiKey_D;
}

# endif

0 comments on commit a916e6a

Please sign in to comment.