43 ImGui::TextColored(ImVec4(0.7f, 0.85f, 1.0f, 1.0f),
48 ImGui::TextDisabled(
"No project loaded.");
56 if (manifest.loaded()) {
59 ImGui::Text(
"Loaded: %s", manifest.hack_name().c_str());
61 ImGui::TextColored(ImVec4(0.9f, 0.3f, 0.3f, 1.0f),
ICON_MD_ERROR);
63 ImGui::TextColored(ImVec4(0.9f, 0.3f, 0.3f, 1.0f),
64 "No manifest loaded — write conflict detection disabled");
68 if (manifest.loaded()) {
69 if (ImGui::BeginTable(
"ManifestInfo", 2,
70 ImGuiTableFlags_SizingStretchProp)) {
71 ImGui::TableSetupColumn(
"Label", ImGuiTableColumnFlags_WidthFixed, 120);
72 ImGui::TableSetupColumn(
"Value");
74 ImGui::TableNextRow();
75 ImGui::TableSetColumnIndex(0);
76 ImGui::TextDisabled(
"Version");
77 ImGui::TableSetColumnIndex(1);
78 ImGui::Text(
"%d", manifest.manifest_version());
80 ImGui::TableNextRow();
81 ImGui::TableSetColumnIndex(0);
82 ImGui::TextDisabled(
"Total Hooks");
83 ImGui::TableSetColumnIndex(1);
84 ImGui::Text(
"%d", manifest.total_hooks());
86 ImGui::TableNextRow();
87 ImGui::TableSetColumnIndex(0);
88 ImGui::TextDisabled(
"Protected Regions");
89 ImGui::TableSetColumnIndex(1);
90 ImGui::Text(
"%zu", manifest.protected_regions().size());
92 ImGui::TableNextRow();
93 ImGui::TableSetColumnIndex(0);
94 ImGui::TextDisabled(
"Feature Flags");
95 ImGui::TableSetColumnIndex(1);
96 ImGui::Text(
"%zu", manifest.feature_flags().size());
98 ImGui::TableNextRow();
99 ImGui::TableSetColumnIndex(0);
100 ImGui::TextDisabled(
"SRAM Variables");
101 ImGui::TableSetColumnIndex(1);
102 ImGui::Text(
"%zu", manifest.sram_variables().size());
110 if (!manifest_path.empty()) {
111 ImGui::TextDisabled(
"Path:");
113 ImGui::TextWrapped(
"%s", manifest_path.c_str());
117 if (std::filesystem::exists(manifest_path, ec)) {
118 auto mtime = std::filesystem::last_write_time(manifest_path, ec);
120 ImGui::TextDisabled(
"Modified:");
122 ImGui::Text(
"%s", FormatFileTime(mtime).c_str());
125 ImGui::TextColored(ImVec4(0.9f, 0.6f, 0.2f, 1.0f),
129 ImGui::TextDisabled(
"Path: (not configured)");
149 ImGui::TextColored(ImVec4(0.9f, 0.3f, 0.3f, 1.0f),
"%s",
152 ImGui::TextColored(ImVec4(0.3f, 0.9f, 0.3f, 1.0f),
"%s",
163 ImGui::TextColored(ImVec4(0.7f, 0.85f, 1.0f, 1.0f),
168 ImGui::TextDisabled(
"Load a manifest to view protected regions.");
175 ImGui::SetNextItemWidth(200);
176 ImGui::InputTextWithHint(
"##RegionFilter",
"Filter by module...",
179 ImGui::Text(
"%zu regions", regions.size());
184 constexpr ImGuiTableFlags kTableFlags =
185 ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg |
186 ImGuiTableFlags_Resizable | ImGuiTableFlags_ScrollY |
187 ImGuiTableFlags_SizingFixedFit;
189 float table_height = ImGui::GetContentRegionAvail().y - 4;
190 if (table_height < 100) table_height = 200;
192 if (ImGui::BeginTable(
"ProtectedRegions", 5, kTableFlags,
193 ImVec2(0, table_height))) {
194 ImGui::TableSetupScrollFreeze(0, 1);
195 ImGui::TableSetupColumn(
"Start", ImGuiTableColumnFlags_WidthFixed, 80);
196 ImGui::TableSetupColumn(
"End", ImGuiTableColumnFlags_WidthFixed, 80);
197 ImGui::TableSetupColumn(
"Size", ImGuiTableColumnFlags_WidthFixed, 50);
198 ImGui::TableSetupColumn(
"Hooks", ImGuiTableColumnFlags_WidthFixed, 45);
199 ImGui::TableSetupColumn(
"Module", ImGuiTableColumnFlags_WidthStretch);
200 ImGui::TableHeadersRow();
202 std::string filter_lower;
205 for (
auto& c : filter_lower) {
206 c =
static_cast<char>(std::tolower(
static_cast<unsigned char>(c)));
210 for (
const auto& region : regions) {
212 if (!filter_lower.empty()) {
213 std::string module_lower = region.module;
214 for (
auto& c : module_lower) {
215 c =
static_cast<char>(std::tolower(
static_cast<unsigned char>(c)));
217 if (module_lower.find(filter_lower) == std::string::npos) {
222 ImGui::TableNextRow();
225 ImGui::TableSetColumnIndex(0);
226 ImGui::Text(
"$%06X", region.start);
229 ImGui::TableSetColumnIndex(1);
230 ImGui::Text(
"$%06X", region.end);
233 ImGui::TableSetColumnIndex(2);
234 uint32_t size = (region.end > region.start) ? region.end - region.start : 0;
235 ImGui::Text(
"%u", size);
238 ImGui::TableSetColumnIndex(3);
239 ImGui::Text(
"%d", region.hook_count);
242 ImGui::TableSetColumnIndex(4);
243 ImGui::TextUnformatted(region.module.c_str());
246 if (ImGui::IsItemHovered() && ImGui::IsMouseClicked(ImGuiMouseButton_Right)) {
247 std::string range_str =
248 absl::StrFormat(
"$%06X-$%06X", region.start, region.end);
249 ImGui::SetClipboardText(range_str.c_str());
256 ImGui::TextDisabled(
"Right-click a module to copy the address range.");