52 ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(6, 4));
53 ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(4, 4));
56 ImGui::OpenPopup(
"JumpToAddress");
58 if (ImGui::IsItemHovered()) {
59 ImGui::SetTooltip(
"Jump to specific address");
64 ImGui::OpenPopup(
"SearchPattern");
66 if (ImGui::IsItemHovered()) {
67 ImGui::SetTooltip(
"Search for hex pattern");
72 ImGui::OpenPopup(
"Bookmarks");
74 if (ImGui::IsItemHovered()) {
75 ImGui::SetTooltip(
"Manage address bookmarks");
84 ImGui::TextColored(ImVec4(0.4f, 0.8f, 1.0f, 1.0f),
88 ImGui::PopStyleVar(2);
97 if (ImGui::BeginPopupModal(
"JumpToAddress",
nullptr,
98 ImGuiWindowFlags_AlwaysAutoResize)) {
99 ImGui::TextColored(ImVec4(0.4f, 0.8f, 1.0f, 1.0f),
104 ImGui::SetNextItemWidth(200);
107 ImGuiInputTextFlags_CharsHexadecimal |
108 ImGuiInputTextFlags_EnterReturnsTrue)) {
114 ImGui::CloseCurrentPopup();
117 ImGui::TextDisabled(
"Format: 0x1C800 or 1C800");
129 ImGui::CloseCurrentPopup();
133 ImGui::CloseCurrentPopup();
140 if (ImGui::BeginPopupModal(
"SearchPattern",
nullptr,
141 ImGuiWindowFlags_AlwaysAutoResize)) {
142 ImGui::TextColored(ImVec4(0.4f, 0.8f, 0.4f, 1.0f),
147 ImGui::SetNextItemWidth(300);
150 ImGuiInputTextFlags_EnterReturnsTrue)) {
152 ImGui::CloseCurrentPopup();
154 ImGui::TextDisabled(
"Use ?? for wildcard (e.g. FF 00 ?? 12)");
159 if (ImGui::SmallButton(
"LDA")) {
163 if (ImGui::SmallButton(
"STA")) {
167 if (ImGui::SmallButton(
"JSR")) {
177 ImGui::CloseCurrentPopup();
181 ImGui::CloseCurrentPopup();
188 if (ImGui::BeginPopupModal(
"Bookmarks",
nullptr,
189 ImGuiWindowFlags_AlwaysAutoResize)) {
190 ImGui::TextColored(ImVec4(1.0f, 0.843f, 0.0f, 1.0f),
201 if (ImGui::Button(
ICON_MD_ADD " Add Current Address", ImVec2(250, 0))) {
205 absl::StrFormat(
"Bookmark %zu",
bookmarks_.size() + 1);
206 new_bookmark.
description =
"User-defined bookmark";
211 ImGui::BeginChild(
"##bookmarks_list", ImVec2(500, 300),
true);
212 if (ImGui::BeginTable(
"##bookmarks_table", 3,
213 ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg |
214 ImGuiTableFlags_Resizable)) {
215 ImGui::TableSetupColumn(
"Name", ImGuiTableColumnFlags_WidthFixed, 150);
216 ImGui::TableSetupColumn(
"Address", ImGuiTableColumnFlags_WidthFixed,
218 ImGui::TableSetupColumn(
"Description",
219 ImGuiTableColumnFlags_WidthStretch);
220 ImGui::TableHeadersRow();
222 for (
size_t i = 0; i <
bookmarks_.size(); ++i) {
224 ImGui::PushID(
static_cast<int>(i));
226 ImGui::TableNextRow();
227 ImGui::TableNextColumn();
228 if (ImGui::Selectable(bm.name.c_str(),
false,
229 ImGuiSelectableFlags_SpanAllColumns)) {
232 ImGui::CloseCurrentPopup();
235 ImGui::TableNextColumn();
236 ImGui::TextColored(ImVec4(0.4f, 0.8f, 1.0f, 1.0f),
"0x%06X",
239 ImGui::TableNextColumn();
240 ImGui::TextDisabled(
"%s", bm.description.c_str());
249 if (ImGui::Button(
ICON_MD_ADD " Add Bookmark", ImVec2(150, 0))) {
253 absl::StrFormat(
"Bookmark %zu",
bookmarks_.size() + 1);
254 new_bookmark.
description =
"User-defined bookmark";
268 ImGui::CloseCurrentPopup();