20 ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.18f, 0.14f, 0.12f, 1.0f));
21 ImGui::BeginChild(
"RomSync", ImVec2(0, 130),
true);
27 if (!state.current_rom_hash.empty()) {
28 ImGui::Text(
"Hash: %s",
29 state.current_rom_hash.substr(0, 16).c_str());
32 ImGui::SetClipboardText(state.current_rom_hash.c_str());
38 ImGui::TextDisabled(
"No ROM loaded");
41 if (state.last_sync_time != absl::InfinitePast()) {
42 ImGui::Text(
"Last Sync: %s",
43 absl::FormatTime(
"%H:%M:%S", state.last_sync_time,
44 absl::LocalTimeZone())
49 ImGui::Checkbox(
"Auto-sync ROM changes", &state.auto_sync_enabled);
51 if (state.auto_sync_enabled) {
52 ImGui::SliderInt(
"Sync Interval (seconds)",
53 &state.sync_interval_seconds, 10, 120);
60 collab_state.active &&
64 ImGui::BeginDisabled();
69 if (diff_result.ok()) {
74 state.current_rom_hash = hash;
75 state.last_sync_time = absl::Now();
80 " ROM synced to collaborators",
83 }
else if (toast_manager) {
85 diff_result.status().message()),
93 if (ImGui::IsItemHovered()) {
94 ImGui::SetTooltip(
"Connect to a network session to sync ROM");
99 if (!state.pending_syncs.empty()) {
102 state.pending_syncs.size());
105 ImGui::BeginChild(
"PendingSyncs", ImVec2(0, 80),
true);
106 for (
const auto& sync : state.pending_syncs) {
107 ImGui::BulletText(
"%s", sync.substr(0, 40).c_str());
113 ImGui::PopStyleColor();
Unified context for agent UI components.
RomSyncState & rom_sync_state()
CollaborationState & collaboration_state()