Skip to content

Commit

Permalink
ui: Fix MainMenuSnapshotsView member visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mborgerson committed Jun 5, 2023
1 parent 7e6ca10 commit 5ac1dd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ui/xui/main-menu.cc
Expand Up @@ -747,7 +747,7 @@ void MainMenuSnapshotsView::ClearSearch()
}
}

static int MainMenuSnapshotsViewUpdateSearchBox(ImGuiInputTextCallbackData *data)
int MainMenuSnapshotsView::OnSearchTextUpdate(ImGuiInputTextCallbackData *data)
{
GError *gerr = NULL;
MainMenuSnapshotsView *win = (MainMenuSnapshotsView*)data->UserData;
Expand Down Expand Up @@ -804,7 +804,7 @@ void MainMenuSnapshotsView::Draw()
ImGui::PushFont(g_font_mgr.m_menu_font_small);
ImGui::InputTextWithHint("##search", "Search or name new snapshot...",
&m_search_buf, ImGuiInputTextFlags_CallbackEdit,
&MainMenuSnapshotsViewUpdateSearchBox, this);
&OnSearchTextUpdate, this);

bool snapshot_with_create_name_exists = false;
for (int i = 0; i < g_snapshot_mgr.m_snapshots_len; ++i) {
Expand Down
7 changes: 4 additions & 3 deletions ui/xui/main-menu.hh
Expand Up @@ -104,20 +104,21 @@ public:
class MainMenuSnapshotsView : public virtual MainMenuTabView
{
protected:
GRegex *m_search_regex;
uint32_t m_current_title_id;
std::string m_current_title_name;
std::string m_search_buf;

private:
void ClearSearch();
void DrawSnapshotContextMenu(QEMUSnapshotInfo *snapshot, XemuSnapshotData *data, int current_snapshot_binding);
bool BigSnapshotButton(QEMUSnapshotInfo *snapshot, XemuSnapshotData *data, int current_snapshot_binding);
static int OnSearchTextUpdate(ImGuiInputTextCallbackData *data);

public:
GRegex *m_search_regex;
MainMenuSnapshotsView();
~MainMenuSnapshotsView();
bool BigSnapshotButton(QEMUSnapshotInfo *snapshot, XemuSnapshotData *data, int current_snapshot_binding);
void Draw() override;

};

class MainMenuSystemView : public virtual MainMenuTabView
Expand Down

0 comments on commit 5ac1dd1

Please sign in to comment.