53 ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(6, 4));
54 ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(4, 4));
57 ImGui::OpenPopup(
"JumpToAddress");
59 if (ImGui::IsItemHovered()) {
60 ImGui::SetTooltip(
"Jump to specific address");
65 ImGui::OpenPopup(
"SearchPattern");
67 if (ImGui::IsItemHovered()) {
68 ImGui::SetTooltip(
"Search for hex pattern");
73 ImGui::OpenPopup(
"Bookmarks");
75 if (ImGui::IsItemHovered()) {
76 ImGui::SetTooltip(
"Manage address bookmarks");
85 ImGui::TextColored(ImVec4(0.4f, 0.8f, 1.0f, 1.0f),
89 ImGui::PopStyleVar(2);
98 if (ImGui::BeginPopupModal(
"JumpToAddress",
nullptr,
99 ImGuiWindowFlags_AlwaysAutoResize)) {
100 ImGui::TextColored(ImVec4(0.4f, 0.8f, 1.0f, 1.0f),
105 ImGui::SetNextItemWidth(200);
108 ImGuiInputTextFlags_CharsHexadecimal |
109 ImGuiInputTextFlags_EnterReturnsTrue)) {
115 ImGui::CloseCurrentPopup();
118 ImGui::TextDisabled(
"Format: 0x1C800 or 1C800");
130 ImGui::CloseCurrentPopup();
134 ImGui::CloseCurrentPopup();
141 if (ImGui::BeginPopupModal(
"SearchPattern",
nullptr,
142 ImGuiWindowFlags_AlwaysAutoResize)) {
143 ImGui::TextColored(ImVec4(0.4f, 0.8f, 0.4f, 1.0f),
148 ImGui::SetNextItemWidth(300);
151 ImGuiInputTextFlags_EnterReturnsTrue)) {
153 ImGui::CloseCurrentPopup();
155 ImGui::TextDisabled(
"Use ?? for wildcard (e.g. FF 00 ?? 12)");
160 if (ImGui::SmallButton(
"LDA")) {
164 if (ImGui::SmallButton(
"STA")) {
168 if (ImGui::SmallButton(
"JSR")) {
178 ImGui::CloseCurrentPopup();
182 ImGui::CloseCurrentPopup();
189 if (ImGui::BeginPopupModal(
"Bookmarks",
nullptr,
190 ImGuiWindowFlags_AlwaysAutoResize)) {
191 ImGui::TextColored(ImVec4(1.0f, 0.843f, 0.0f, 1.0f),
202 if (ImGui::Button(
ICON_MD_ADD " Add Current Address", ImVec2(250, 0))) {
206 absl::StrFormat(
"Bookmark %zu",
bookmarks_.size() + 1);
207 new_bookmark.
description =
"User-defined bookmark";
212 ImGui::BeginChild(
"##bookmarks_list", ImVec2(500, 300),
true);
213 if (ImGui::BeginTable(
"##bookmarks_table", 3,
214 ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg |
215 ImGuiTableFlags_Resizable)) {
216 ImGui::TableSetupColumn(
"Name", ImGuiTableColumnFlags_WidthFixed, 150);
217 ImGui::TableSetupColumn(
"Address", ImGuiTableColumnFlags_WidthFixed,
219 ImGui::TableSetupColumn(
"Description",
220 ImGuiTableColumnFlags_WidthStretch);
221 ImGui::TableHeadersRow();
223 for (
size_t i = 0; i <
bookmarks_.size(); ++i) {
225 ImGui::PushID(
static_cast<int>(i));
227 ImGui::TableNextRow();
228 ImGui::TableNextColumn();
229 if (ImGui::Selectable(bm.name.c_str(),
false,
230 ImGuiSelectableFlags_SpanAllColumns)) {
233 ImGui::CloseCurrentPopup();
236 ImGui::TableNextColumn();
237 ImGui::TextColored(ImVec4(0.4f, 0.8f, 1.0f, 1.0f),
"0x%06X",
240 ImGui::TableNextColumn();
241 ImGui::TextDisabled(
"%s", bm.description.c_str());
250 if (ImGui::Button(
ICON_MD_ADD " Add Bookmark", ImVec2(150, 0))) {
254 absl::StrFormat(
"Bookmark %zu",
bookmarks_.size() + 1);
255 new_bookmark.
description =
"User-defined bookmark";
269 ImGui::CloseCurrentPopup();