ui: Use pretty hexadecimal input fields in more places

This commit is contained in:
WerWolv
2022-03-25 21:07:41 +01:00
parent e72a30ca59
commit f39ec58435
2 changed files with 3 additions and 9 deletions

View File

@@ -302,9 +302,7 @@ namespace hex::plugin::builtin::prv {
ImGui::Separator();
ImGui::TextUnformatted("0x");
ImGui::SameLine();
ImGui::InputScalar("hex.builtin.common.size"_lang, ImGuiDataType_U64, &this->m_size, nullptr, nullptr, "%llx", ImGuiInputTextFlags_CharsHexadecimal);
ImGui::InputHexadecimal("hex.builtin.common.size"_lang, &this->m_size, ImGuiInputTextFlags_CharsHexadecimal);
if (this->m_port < 0)
this->m_port = 0;

View File

@@ -347,9 +347,7 @@ namespace hex::plugin::builtin {
}
if (ImGui::BeginPopupModal("hex.builtin.view.hex_editor.menu.edit.resize"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize)) {
ImGui::TextUnformatted("0x");
ImGui::SameLine();
ImGui::InputScalar("hex.builtin.common.size"_lang, ImGuiDataType_U64, &this->m_resizeSize, nullptr, nullptr, "%llx", ImGuiInputTextFlags_CharsHexadecimal);
ImGui::InputHexadecimal("hex.builtin.common.size"_lang, &this->m_resizeSize, ImGuiInputTextFlags_CharsHexadecimal);
ImGui::NewLine();
confirmButtons(
@@ -364,9 +362,7 @@ namespace hex::plugin::builtin {
}
if (ImGui::BeginPopupModal("hex.builtin.view.hex_editor.menu.edit.insert"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize)) {
ImGui::TextUnformatted("0x");
ImGui::SameLine();
ImGui::InputScalar("hex.builtin.common.size"_lang, ImGuiDataType_U64, &this->m_resizeSize, nullptr, nullptr, "%llx", ImGuiInputTextFlags_CharsHexadecimal);
ImGui::InputHexadecimal("hex.builtin.common.size"_lang, &this->m_resizeSize, ImGuiInputTextFlags_CharsHexadecimal);
ImGui::NewLine();
confirmButtons(