1
0
mirror of synced 2024-11-25 00:00:27 +01:00

ui: Welcome screen, GDB Provider and memory editor ui fixes

This commit is contained in:
WerWolv 2021-12-08 22:18:59 +01:00
parent 3086f259ff
commit 2ac6348fbf
3 changed files with 17 additions and 3 deletions

View File

@ -239,7 +239,9 @@ struct MemoryEditor
DataPreviewAddrOld = DataPreviewAddr;
DataPreviewAddrEndOld = DataPreviewAddrEnd;
if (mem_size > 0)
DrawContents(mem_data, mem_size, base_display_addr);
if (ContentsWidthChanged)
{
CalcSizes(s, mem_size, base_display_addr);

View File

@ -204,7 +204,17 @@ namespace hex::plugin::builtin::prv {
}
std::string GDBProvider::getName() const {
return hex::format("hex.builtin.provider.gdb.name"_lang, this->m_ipAddress, this->m_port);
std::string address, port;
if (this->m_ipAddress.empty()) {
address = "-";
port = "-";
} else {
address = this->m_ipAddress;
port = std::to_string(this->m_port);
}
return hex::format("hex.builtin.provider.gdb.name"_lang, address, port);
}
std::vector<std::pair<std::string, std::string>> GDBProvider::getDataInformation() const {

View File

@ -546,7 +546,7 @@ namespace hex {
ImGui::TextWrapped("A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.");
ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeightWithSpacing() * 5);
ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeightWithSpacing() * 6);
ImGui::TableNextColumn();
@ -563,7 +563,9 @@ namespace hex {
ImGui::OpenPopup("hex.welcome.start.popup.open_other"_lang);
}
ImGui::SetNextWindowPos(ImGui::GetWindowPos() + ImGui::GetCursorPos());
if (ImGui::BeginPopup("hex.welcome.start.popup.open_other"_lang)) {
for (const auto &unlocalizedProviderName : ContentRegistry::Provider::getEntries()) {
if (ImGui::Hyperlink(LangEntry(unlocalizedProviderName))) {
EventManager::post<RequestCreateProvider>(unlocalizedProviderName, nullptr);