mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 21:57:57 +03:00
22 lines
643 B
Text
22 lines
643 B
Text
![]() |
#import "SettingsViewController.h"
|
||
|
#include "../AppConfig.h"
|
||
|
#include "PreferenceDefs.h"
|
||
|
|
||
|
@implementation SettingsViewController
|
||
|
|
||
|
-(void)viewDidLoad
|
||
|
{
|
||
|
[showFpsSwitch setOn: CAppConfig::GetInstance().GetPreferenceBoolean(PREFERENCE_UI_SHOWFPS)];
|
||
|
[showVirtualPadSwitch setOn: CAppConfig::GetInstance().GetPreferenceBoolean(PREFERENCE_UI_SHOWVIRTUALPAD)];
|
||
|
}
|
||
|
|
||
|
-(void)viewDidDisappear: (BOOL)animated
|
||
|
{
|
||
|
CAppConfig::GetInstance().SetPreferenceBoolean(PREFERENCE_UI_SHOWFPS, showFpsSwitch.isOn);
|
||
|
CAppConfig::GetInstance().SetPreferenceBoolean(PREFERENCE_UI_SHOWVIRTUALPAD, showVirtualPadSwitch.isOn);
|
||
|
|
||
|
CAppConfig::GetInstance().Save();
|
||
|
}
|
||
|
|
||
|
@end
|