Skip to content

Commit 5376f68

Browse files
committed
Removing obsolete ImGui::GetKeyIndex calls.
1 parent 5a7efc2 commit 5376f68

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

include/zep/imgui/editor_imgui.h

+13-13
Original file line numberDiff line numberDiff line change
@@ -140,67 +140,67 @@ class ZepEditor_ImGui : public ZepEditor
140140
}
141141
}
142142

143-
if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Tab)))
143+
if (ImGui::IsKeyPressed(ImGuiKey_Tab))
144144
{
145145
buffer.GetMode()->AddKeyPress(ExtKeys::TAB, mod);
146146
return;
147147
}
148-
if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape)))
148+
if (ImGui::IsKeyPressed(ImGuiKey_Escape))
149149
{
150150
buffer.GetMode()->AddKeyPress(ExtKeys::ESCAPE, mod);
151151
return;
152152
}
153-
else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Enter)))
153+
else if (ImGui::IsKeyPressed(ImGuiKey_Enter))
154154
{
155155
buffer.GetMode()->AddKeyPress(ExtKeys::RETURN, mod);
156156
return;
157157
}
158-
else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Delete)))
158+
else if (ImGui::IsKeyPressed(ImGuiKey_Delete))
159159
{
160160
buffer.GetMode()->AddKeyPress(ExtKeys::DEL, mod);
161161
return;
162162
}
163-
else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Home)))
163+
else if (ImGui::IsKeyPressed(ImGuiKey_Home))
164164
{
165165
buffer.GetMode()->AddKeyPress(ExtKeys::HOME, mod);
166166
return;
167167
}
168-
else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_End)))
168+
else if (ImGui::IsKeyPressed(ImGuiKey_End))
169169
{
170170
buffer.GetMode()->AddKeyPress(ExtKeys::END, mod);
171171
return;
172172
}
173-
else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Backspace)))
173+
else if (ImGui::IsKeyPressed(ImGuiKey_Backspace))
174174
{
175175
buffer.GetMode()->AddKeyPress(ExtKeys::BACKSPACE, mod);
176176
return;
177177
}
178-
else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow)))
178+
else if (ImGui::IsKeyPressed(ImGuiKey_RightArrow))
179179
{
180180
buffer.GetMode()->AddKeyPress(ExtKeys::RIGHT, mod);
181181
return;
182182
}
183-
else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow)))
183+
else if (ImGui::IsKeyPressed(ImGuiKey_LeftArrow))
184184
{
185185
buffer.GetMode()->AddKeyPress(ExtKeys::LEFT, mod);
186186
return;
187187
}
188-
else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow)))
188+
else if (ImGui::IsKeyPressed(ImGuiKey_UpArrow))
189189
{
190190
buffer.GetMode()->AddKeyPress(ExtKeys::UP, mod);
191191
return;
192192
}
193-
else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow)))
193+
else if (ImGui::IsKeyPressed(ImGuiKey_DownArrow))
194194
{
195195
buffer.GetMode()->AddKeyPress(ExtKeys::DOWN, mod);
196196
return;
197197
}
198-
else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_PageDown)))
198+
else if (ImGui::IsKeyPressed(ImGuiKey_PageDown))
199199
{
200200
buffer.GetMode()->AddKeyPress(ExtKeys::PAGEDOWN, mod);
201201
return;
202202
}
203-
else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_PageUp)))
203+
else if (ImGui::IsKeyPressed(ImGuiKey_PageUp))
204204
{
205205
buffer.GetMode()->AddKeyPress(ExtKeys::PAGEUP, mod);
206206
return;

0 commit comments

Comments
 (0)