Skip to content

Commit

Permalink
IsKeyPressed -> IsKeyDown
Browse files Browse the repository at this point in the history
  • Loading branch information
Raais committed May 21, 2022
1 parent df528ac commit b389144
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sources/ims_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void ImStudio::BufferWindow::drawall()

//HOTKEY: ALT + M - "Add" Context Menu
if ((ImGui::IsWindowHovered()) &&
((ImGui::IsKeyPressed(ImGuiKey_ModAlt) && (ImGui::IsKeyPressed(ImGuiKey_M))) ||
((ImGui::IsKeyDown(ImGuiKey_ModAlt) && (ImGui::IsKeyPressed(ImGuiKey_M))) ||
(ImGui::IsWindowHovered() && ImGui::IsMouseClicked(1))))
{
ImGui::OpenPopup("bwcontextmenu");
Expand Down
2 changes: 1 addition & 1 deletion src/sources/ims_gui_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void ImStudio::GUI::ShowProperties()
ImGui::NewLine();

//HOTKEY: CTRL + E - Focus on property field
if (ImGui::IsKeyPressed(ImGuiKey_ModCtrl) && (ImGui::IsKeyPressed(ImGuiKey_E)))
if (ImGui::IsKeyDown(ImGuiKey_ModCtrl) && (ImGui::IsKeyPressed(ImGuiKey_E)))
{
ImGui::SetKeyboardFocusHere();
}
Expand Down

0 comments on commit b389144

Please sign in to comment.