impr: More information view UI improvements
This commit is contained in:
parent
c32dad75cd
commit
1a8a9e53e1
@ -45,7 +45,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
void analyze();
|
||||
|
||||
int m_inputChunkSize = 0;
|
||||
u32 m_inputChunkSize = 0;
|
||||
ui::RegionType m_selectionType = ui::RegionType::EntireData;
|
||||
};
|
||||
|
||||
|
@ -40,15 +40,15 @@ namespace hex::plugin::builtin::ui {
|
||||
case RegionType::Region:
|
||||
ImGui::SameLine();
|
||||
|
||||
const auto width = ImGui::GetContentRegionAvail().x / 2 - ImGui::CalcTextSize(" - ").x / 2 - ImGui::GetStyle().FramePadding.x * 4;
|
||||
const auto width = ImGui::GetContentRegionAvail().x / 2 - ImGui::CalcTextSize(" - ").x / 2;
|
||||
u64 start = region->getStartAddress(), end = region->getEndAddress();
|
||||
|
||||
ImGui::PushItemWidth(width);
|
||||
ImGuiExt::InputHexadecimal("##start", &start);
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::SameLine();
|
||||
ImGui::SameLine(0, 0);
|
||||
ImGui::TextUnformatted(" - ");
|
||||
ImGui::SameLine();
|
||||
ImGui::SameLine(0, 0);
|
||||
ImGui::PushItemWidth(width);
|
||||
ImGuiExt::InputHexadecimal("##end", &end);
|
||||
ImGui::PopItemWidth();
|
||||
|
@ -73,7 +73,7 @@ namespace hex::plugin::builtin {
|
||||
this->m_analyzedRegion = { provider->getBaseAddress(), provider->getActualSize() };
|
||||
}
|
||||
|
||||
if (this->m_inputChunkSize <= 0) {
|
||||
if (this->m_inputChunkSize == 0) {
|
||||
this->m_inputChunkSize = 256;
|
||||
}
|
||||
|
||||
@ -144,14 +144,14 @@ namespace hex::plugin::builtin {
|
||||
ImGuiExt::BeginSubWindow("hex.builtin.common.settings"_lang);
|
||||
{
|
||||
if (ImGui::BeginTable("SettingsTable", 2, ImGuiTableFlags_BordersInner | ImGuiTableFlags_SizingFixedSame, ImVec2(ImGui::GetContentRegionAvail().x, 0))) {
|
||||
ImGui::TableSetupColumn("Left", ImGuiTableColumnFlags_WidthStretch, 0.3F);
|
||||
ImGui::TableSetupColumn("Right", ImGuiTableColumnFlags_WidthStretch, 0.7F);
|
||||
ImGui::TableSetupColumn("Left", ImGuiTableColumnFlags_WidthStretch, 0.5F);
|
||||
ImGui::TableSetupColumn("Right", ImGuiTableColumnFlags_WidthStretch, 0.5F);
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ui::regionSelectionPicker(&this->m_analysisRegion, provider, &this->m_selectionType, false);
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::InputInt("hex.builtin.view.information.block_size"_lang, &this->m_inputChunkSize, ImGuiInputTextFlags_CharsDecimal);
|
||||
ImGuiExt::InputHexadecimal("hex.builtin.view.information.block_size"_lang, &this->m_inputChunkSize);
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user