First commit of Freestyle Judo 1.0
This commit is contained in:
@@ -0,0 +1,131 @@
|
||||
//
|
||||
// FSJSettingsViewController.m
|
||||
// Freestyle Judo
|
||||
//
|
||||
// Created by Vincente D'Ingianni on 10/4/13.
|
||||
// Copyright (c) 2013 Binary Systems, Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FSJSettingsViewController.h"
|
||||
|
||||
#include "Settings.h"
|
||||
|
||||
@implementation FSJSettingsViewController
|
||||
|
||||
|
||||
@synthesize FreestyleJudoButton = _FreestyleJudoButton;
|
||||
@synthesize SettingsToolbar = _SettingsToolbar;
|
||||
@synthesize DoneButton = _DoneButton;
|
||||
@synthesize AutoScoreOsaekomiSwitch = _AutoScoreOsaekomiSwitch;
|
||||
@synthesize IpponForOsaekomiSwitch = _IpponForOsaekomiSwitch;
|
||||
@synthesize BackgoundMusicSwitch = _BackgoundMusicSwitch;
|
||||
@synthesize IntervalTimerSwitch = _IntervalTimerSwitch;
|
||||
|
||||
|
||||
|
||||
- (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
|
||||
{
|
||||
if ([segue.identifier isEqualToString:@"showFSJWebSite"])
|
||||
{
|
||||
[segue.destinationViewController setTitle:@"showFSJWebSite"];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
|
||||
{
|
||||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
||||
if (self) {
|
||||
// Custom initialization
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
|
||||
_BackgoundMusicSwitch.on = isMusicControlEnabled;
|
||||
_IpponForOsaekomiSwitch.on = isIpponForOsaekomiEnabled;
|
||||
_IntervalTimerSwitch.on = isIntervalTimerEnabled;
|
||||
_BackgoundMusicSwitch.on = isMusicControlEnabled;
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(BOOL)shouldAutorotate
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
- (NSUInteger)supportedInterfaceOrientations
|
||||
{
|
||||
return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;
|
||||
}
|
||||
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)switchAutoScore:(UISwitch *)sender {
|
||||
if (_AutoScoreOsaekomiSwitch.on) {
|
||||
isAutoScoreOsaekomiEnabled = TRUE;
|
||||
}
|
||||
else {
|
||||
isAutoScoreOsaekomiEnabled = FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)switchIpponForOsaekomi:(UISwitch *)sender {
|
||||
if (_IpponForOsaekomiSwitch.on) {
|
||||
isIpponForOsaekomiEnabled = TRUE;
|
||||
}
|
||||
else {
|
||||
isIpponForOsaekomiEnabled = FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)switchMusic:(UISwitch *)sender {
|
||||
if (_BackgoundMusicSwitch.on) {
|
||||
// Music On
|
||||
isMusicControlEnabled = TRUE;
|
||||
}
|
||||
else {
|
||||
// Music Off
|
||||
isMusicControlEnabled = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (IBAction)switchIntervalTimer:(UISwitch *)sender {
|
||||
if (_IntervalTimerSwitch.on) {
|
||||
// Music On
|
||||
isIntervalTimerEnabled = TRUE;
|
||||
}
|
||||
else {
|
||||
// Music Off
|
||||
isIntervalTimerEnabled = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)done:(UIBarButtonItem *)sender {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user