Add reload button to GameBrowser. Fix assert if game load failed

This commit is contained in:
Henrik Rydgård
2023-12-29 00:18:04 +01:00
parent 9317ad4b23
commit cd00d06842
3 changed files with 13 additions and 4 deletions
+5
View File
@@ -801,6 +801,11 @@ void GameBrowser::Refresh() {
layoutChoice->AddChoice(ImageID("I_LINES"));
layoutChoice->SetSelection(*gridStyle_ ? 0 : 1, false);
layoutChoice->OnChoice.Handle(this, &GameBrowser::LayoutChange);
topBar->Add(new Choice(ImageID("I_ROTATE_LEFT"), new LayoutParams(64.0f, 64.0f)))->OnClick.Add([=](UI::EventParams &e) {
path_.Refresh();
Refresh();
return UI::EVENT_DONE;
});
topBar->Add(new Choice(ImageID("I_GEAR"), new LayoutParams(64.0f, 64.0f)))->OnClick.Handle(this, &GameBrowser::GridSettingsClick);
Add(topBar);