impr: Replaced centered text notes with overlays
This commit is contained in:
parent
7cc99c6fc9
commit
c5d3387962
@ -290,7 +290,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
if (ImGui::BeginChild("##bookmarks")) {
|
||||
if (m_bookmarks->empty()) {
|
||||
ImGuiExt::TextFormattedCentered("hex.builtin.view.bookmarks.no_bookmarks"_lang);
|
||||
ImGuiExt::TextOverlay("hex.builtin.view.bookmarks.no_bookmarks"_lang, ImGui::GetWindowPos() + ImGui::GetWindowSize() / 2, ImGui::GetWindowWidth() * 0.7);
|
||||
}
|
||||
|
||||
auto bookmarkToRemove = m_bookmarks->end();
|
||||
|
@ -248,13 +248,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
|
||||
if (m_selectedProvider == nullptr || !m_selectedProvider->isReadable() || m_validBytes <= 0) {
|
||||
// Draw a message when no bytes are selected
|
||||
std::string text = "hex.builtin.view.data_inspector.no_data"_lang;
|
||||
auto textSize = ImGui::CalcTextSize(text.c_str());
|
||||
auto availableSpace = ImGui::GetContentRegionAvail();
|
||||
|
||||
ImGui::SetCursorPos((availableSpace - textSize) / 2.0F);
|
||||
ImGui::TextUnformatted(text.c_str());
|
||||
ImGuiExt::TextOverlay("hex.builtin.view.data_inspector.no_data"_lang, ImGui::GetWindowPos() + ImGui::GetWindowSize() / 2, ImGui::GetWindowWidth() * 0.7);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -505,7 +505,7 @@ namespace hex::ui {
|
||||
m_frameStartSelectionRegion = selection;
|
||||
|
||||
if (m_provider == nullptr || m_provider->getActualSize() == 0) {
|
||||
ImGuiExt::TextFormattedCentered("{}", "hex.ui.hex_editor.no_bytes"_lang);
|
||||
ImGuiExt::TextOverlay("hex.ui.hex_editor.no_bytes"_lang, ImGui::GetWindowPos() + ImGui::GetWindowSize() / 2, ImGui::GetWindowWidth() * 0.7);
|
||||
}
|
||||
|
||||
if (!m_editingAddress.has_value() && ImGui::IsKeyPressed(ImGuiKey_Escape))
|
||||
|
Loading…
x
Reference in New Issue
Block a user