mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -05:00
build: Updated ImGui to v1.90.5
This commit is contained in:
@@ -75,7 +75,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
ImGui::EndChild();
|
||||
|
||||
if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape)))
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_Escape))
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::SetCursorPosX(width / 9 * 5);
|
||||
if (ImGui::Button("hex.ui.common.no"_lang, ImVec2(width / 3, 0)) || ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape))) {
|
||||
if (ImGui::Button("hex.ui.common.no"_lang, ImVec2(width / 3, 0)) || ImGui::IsKeyPressed(ImGuiKey_Escape)) {
|
||||
m_noFunction();
|
||||
this->close();
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
);
|
||||
|
||||
if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape)))
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_Escape))
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace hex::plugin::builtin::recent {
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
||||
if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape)))
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_Escape))
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
@@ -766,7 +766,7 @@ namespace hex::plugin::builtin {
|
||||
};
|
||||
|
||||
// Allow the window to be closed by pressing ESC
|
||||
if (ImGui::IsKeyDown(ImGui::GetKeyIndex(ImGuiKey_Escape)))
|
||||
if (ImGui::IsKeyDown(ImGuiKey_Escape))
|
||||
ImGui::CloseCurrentPopup();
|
||||
|
||||
if (ImGui::BeginTabBar("about_tab_bar")) {
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace hex::plugin::builtin {
|
||||
ImGui::BringWindowToFocusFront(ImGui::GetCurrentWindowRead());
|
||||
|
||||
// Close the popup if the user presses ESC
|
||||
if (ImGui::IsKeyDown(ImGui::GetKeyIndex(ImGuiKey_Escape)))
|
||||
if (ImGui::IsKeyDown(ImGuiKey_Escape))
|
||||
ImGui::CloseCurrentPopup();
|
||||
|
||||
|
||||
|
||||
@@ -990,7 +990,7 @@ namespace hex::plugin::builtin {
|
||||
// Handle deletion of links using the Delete key
|
||||
{
|
||||
const int selectedLinkCount = ImNodes::NumSelectedLinks();
|
||||
if (selectedLinkCount > 0 && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Delete))) {
|
||||
if (selectedLinkCount > 0 && ImGui::IsKeyPressed(ImGuiKey_Delete)) {
|
||||
std::vector<int> selectedLinks;
|
||||
selectedLinks.resize(static_cast<size_t>(selectedLinkCount));
|
||||
ImNodes::GetSelectedLinks(selectedLinks.data());
|
||||
@@ -1005,7 +1005,7 @@ namespace hex::plugin::builtin {
|
||||
// Handle deletion of noes using the Delete key
|
||||
{
|
||||
const int selectedNodeCount = ImNodes::NumSelectedNodes();
|
||||
if (selectedNodeCount > 0 && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Delete))) {
|
||||
if (selectedNodeCount > 0 && ImGui::IsKeyPressed(ImGuiKey_Delete)) {
|
||||
std::vector<int> selectedNodes;
|
||||
selectedNodes.resize(static_cast<size_t>(selectedNodeCount));
|
||||
ImNodes::GetSelectedNodes(selectedNodes.data());
|
||||
|
||||
@@ -492,7 +492,7 @@ namespace hex::plugin::builtin {
|
||||
ImGui::SetNextWindowPos(ImGui::GetWindowPos() + ImGui::GetWindowContentRegionMin() - ImGui::GetStyle().WindowPadding, ImGuiCond_Appearing);
|
||||
if (ImGui::BeginPopup("##hex_editor_popup", ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize |ImGuiWindowFlags_NoTitleBar)) {
|
||||
// Force close the popup when user is editing an input
|
||||
if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape))){
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_Escape)){
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
|
||||
|
||||
@@ -883,7 +883,7 @@ namespace hex::plugin::builtin {
|
||||
ImGui::EndTable();
|
||||
}
|
||||
// Escape key to close the popup
|
||||
if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape), false))
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_Escape, false))
|
||||
ImGui::CloseCurrentPopup();
|
||||
|
||||
ImGui::EndPopup();
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::SetCursorPosX(width / 9 * 5);
|
||||
if (ImGui::Button("hex.builtin.popup.safety_backup.delete"_lang, ImVec2(width / 3, 0)) || ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape))) {
|
||||
if (ImGui::Button("hex.builtin.popup.safety_backup.delete"_lang, ImVec2(width / 3, 0)) || ImGui::IsKeyPressed(ImGuiKey_Escape)) {
|
||||
m_deleteCallback();
|
||||
|
||||
this->close();
|
||||
@@ -133,7 +133,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
ImGui::SameLine((ImGui::GetMainViewport()->Size / 3 - ImGui::CalcTextSize("hex.ui.common.close"_lang) - ImGui::GetStyle().FramePadding).x);
|
||||
|
||||
if (ImGui::Button("hex.ui.common.close"_lang) || ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape)))
|
||||
if (ImGui::Button("hex.ui.common.close"_lang) || ImGui::IsKeyPressed(ImGuiKey_Escape))
|
||||
Popup::close();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace hex::plugin::hashes {
|
||||
ImGui::InputText("##result", m_result, ImGuiInputTextFlags_ReadOnly);
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape)))
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_Escape))
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::SetCursorPosX(width / 9 * 5);
|
||||
if (ImGui::Button("hex.ui.common.no"_lang, ImVec2(width / 3, 0)) || ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape))) {
|
||||
if (ImGui::Button("hex.ui.common.no"_lang, ImVec2(width / 3, 0)) || ImGui::IsKeyPressed(ImGuiKey_Escape)) {
|
||||
s_yesNoQuestionBoxResult = false;
|
||||
this->close();
|
||||
}
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
ImGui::EndDisabled();
|
||||
ImGui::SameLine();
|
||||
ImGui::SetCursorPosX(width / 9 * 5);
|
||||
if (ImGui::Button("hex.ui.common.cancel"_lang, ImVec2(width / 3, 0)) || ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape))) {
|
||||
if (ImGui::Button("hex.ui.common.cancel"_lang, ImVec2(width / 3, 0)) || ImGui::IsKeyPressed(ImGuiKey_Escape)) {
|
||||
s_inputTextBoxResult = "";
|
||||
this->close();
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ namespace hex::ui {
|
||||
}, {}, m_multiple);
|
||||
}
|
||||
|
||||
if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape)))
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_Escape))
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace hex::ui {
|
||||
|
||||
ImGui::SetWindowPos((ImHexApi::System::getMainWindowSize() - ImGui::GetWindowSize()) / 2, ImGuiCond_Appearing);
|
||||
|
||||
if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape)))
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_Escape))
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
@@ -37,13 +37,13 @@ namespace hex::ui {
|
||||
|
||||
auto width = ImGui::GetWindowWidth();
|
||||
ImGui::SetCursorPosX(width / 9);
|
||||
if (ImGui::Button("hex.ui.common.okay"_lang, ImVec2(width / 3, 0)) || ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Enter))) {
|
||||
if (ImGui::Button("hex.ui.common.okay"_lang, ImVec2(width / 3, 0)) || ImGui::IsKeyPressed(ImGuiKey_Enter)) {
|
||||
m_function(m_input);
|
||||
this->close();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::SetCursorPosX(width / 9 * 5);
|
||||
if (ImGui::Button("hex.ui.common.cancel"_lang, ImVec2(width / 3, 0)) || ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Escape))) {
|
||||
if (ImGui::Button("hex.ui.common.cancel"_lang, ImVec2(width / 3, 0)) || ImGui::IsKeyPressed(ImGuiKey_Escape)) {
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ namespace hex::plugin::visualizers {
|
||||
}
|
||||
|
||||
void processKeyEvent(ImGuiKey key, float &variable, float incr, float accel) {
|
||||
if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(key))) {
|
||||
if (ImGui::IsKeyPressed(key)) {
|
||||
auto temp = variable + incr * accel;
|
||||
if (variable * temp < 0.0F)
|
||||
variable = 0.0F;
|
||||
@@ -297,8 +297,8 @@ namespace hex::plugin::visualizers {
|
||||
|
||||
void processInputEvents(gl::Vector<float, 3> &rotation, gl::Vector<float, 3> &translation, float &scaling, float &nearLimit, float &farLimit) {
|
||||
auto accel = 1.0F;
|
||||
if (ImGui::IsKeyDown(ImGui::GetKeyIndex(ImGuiKey_LeftShift)) ||
|
||||
ImGui::IsKeyDown(ImGui::GetKeyIndex(ImGuiKey_RightShift)))
|
||||
if (ImGui::IsKeyDown(ImGuiKey_LeftShift) ||
|
||||
ImGui::IsKeyDown(ImGuiKey_RightShift))
|
||||
accel = 10.0F;
|
||||
|
||||
auto dragDelta = ImGui::GetMouseDragDelta(ImGuiMouseButton_Middle);
|
||||
|
||||
Reference in New Issue
Block a user