mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-18 17:00:30 +02:00
Fix state of fullscreen button on main screen
This commit is contained in:
1 parent
ac437ff05d
commit
cbab0ce203
3 files changed
+33
-16
No files matched your search
+5
-6
@@ -1456,16 +1456,15 @@ void MainScreen::CreateViews() {
|
||||
ViewGroup *logo = new LogoView(false, new LinearLayoutParams(FILL_PARENT, 80.0f));
|
||||
#if !defined(MOBILE_DEVICE)
|
||||
auto gr = GetI18NCategory(I18NCat::GRAPHICS);
|
||||
ImageID icon(g_Config.bFullScreen ? "I_RESTORE" : "I_FULLSCREEN");
|
||||
UI::Button *fullscreenButton = logo->Add(new Button("", icon, new AnchorLayoutParams(48, 48, NONE, 0, 0, NONE, Centering::None)));
|
||||
Button *fullscreenButton = logo->Add(new Button("", ImageID(), new AnchorLayoutParams(48, 48, NONE, 0, 0, NONE, Centering::None)));
|
||||
fullscreenButton->SetIgnoreText(true);
|
||||
fullscreenButton->OnClick.Add([fullscreenButton](UI::EventParams &e) {
|
||||
if (fullscreenButton) {
|
||||
fullscreenButton->SetImageID(ImageID(!g_Config.bFullScreen ? "I_RESTORE" : "I_FULLSCREEN"));
|
||||
}
|
||||
fullscreenButton->OnClick.Add([this](UI::EventParams &e) {
|
||||
g_Config.bFullScreen = !g_Config.bFullScreen;
|
||||
System_ApplyFullscreenState();
|
||||
});
|
||||
fullscreenButton->SetImageIDFunc([this]() {
|
||||
return g_Config.bFullScreen ? ImageID("I_RESTORE") : ImageID("I_FULLSCREEN");
|
||||
});
|
||||
#endif
|
||||
rightColumnItems->Add(logo);
|
||||
|
||||
|
||||
Reference in new issue
Block a user