bump version to 10
- add option to invert AIR input - create seperate settings pagemaster
parent
8a2a526687
commit
049407e1b5
|
@ -7,6 +7,7 @@
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
|
1961EB742507451600C79BF8 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 1961EB732507451600C79BF8 /* Settings.bundle */; };
|
||||||
1968E72624086C2200784829 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1968E72524086C2200784829 /* AppDelegate.m */; };
|
1968E72624086C2200784829 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1968E72524086C2200784829 /* AppDelegate.m */; };
|
||||||
1968E72924086C2200784829 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1968E72824086C2200784829 /* ViewController.m */; };
|
1968E72924086C2200784829 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1968E72824086C2200784829 /* ViewController.m */; };
|
||||||
1968E72C24086C2200784829 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1968E72A24086C2200784829 /* Main.storyboard */; };
|
1968E72C24086C2200784829 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1968E72A24086C2200784829 /* Main.storyboard */; };
|
||||||
|
@ -21,6 +22,7 @@
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
1277586B240D1432002C27EE /* MainApp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MainApp.h; sourceTree = "<group>"; };
|
1277586B240D1432002C27EE /* MainApp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MainApp.h; sourceTree = "<group>"; };
|
||||||
|
1961EB732507451600C79BF8 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
|
||||||
1968E72124086C2200784829 /* Brokenithm-iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Brokenithm-iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
1968E72124086C2200784829 /* Brokenithm-iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Brokenithm-iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
1968E72424086C2200784829 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
1968E72424086C2200784829 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||||
1968E72524086C2200784829 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
1968E72524086C2200784829 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||||
|
@ -84,6 +86,7 @@
|
||||||
19F40719240CFCFF00D7F506 /* MainApp.m */,
|
19F40719240CFCFF00D7F506 /* MainApp.m */,
|
||||||
1968E72724086C2200784829 /* ViewController.h */,
|
1968E72724086C2200784829 /* ViewController.h */,
|
||||||
1968E72824086C2200784829 /* ViewController.m */,
|
1968E72824086C2200784829 /* ViewController.m */,
|
||||||
|
1961EB732507451600C79BF8 /* Settings.bundle */,
|
||||||
1968E72A24086C2200784829 /* Main.storyboard */,
|
1968E72A24086C2200784829 /* Main.storyboard */,
|
||||||
1968E72D24086C2B00784829 /* Assets.xcassets */,
|
1968E72D24086C2B00784829 /* Assets.xcassets */,
|
||||||
1968E73224086C2B00784829 /* Info.plist */,
|
1968E73224086C2B00784829 /* Info.plist */,
|
||||||
|
@ -170,6 +173,7 @@
|
||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
1961EB742507451600C79BF8 /* Settings.bundle in Resources */,
|
||||||
1968E72E24086C2B00784829 /* Assets.xcassets in Resources */,
|
1968E72E24086C2B00784829 /* Assets.xcassets in Resources */,
|
||||||
19F40723240FE2B800D7F506 /* zh.lproj in Resources */,
|
19F40723240FE2B800D7F506 /* zh.lproj in Resources */,
|
||||||
1968E72C24086C2200784829 /* Main.storyboard in Resources */,
|
1968E72C24086C2200784829 /* Main.storyboard in Resources */,
|
||||||
|
@ -349,7 +353,7 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 8;
|
CURRENT_PROJECT_VERSION = 10;
|
||||||
DEVELOPMENT_TEAM = K9CP5766XY;
|
DEVELOPMENT_TEAM = K9CP5766XY;
|
||||||
INFOPLIST_FILE = "Brokenithm-iOS/Info.plist";
|
INFOPLIST_FILE = "Brokenithm-iOS/Info.plist";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
|
@ -373,7 +377,7 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 8;
|
CURRENT_PROJECT_VERSION = 10;
|
||||||
DEVELOPMENT_TEAM = K9CP5766XY;
|
DEVELOPMENT_TEAM = K9CP5766XY;
|
||||||
INFOPLIST_FILE = "Brokenithm-iOS/Info.plist";
|
INFOPLIST_FILE = "Brokenithm-iOS/Info.plist";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
|
|
|
@ -0,0 +1,63 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>StringsTable</key>
|
||||||
|
<string>Root</string>
|
||||||
|
<key>PreferenceSpecifiers</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>PSToggleSwitchSpecifier</string>
|
||||||
|
<key>Title</key>
|
||||||
|
<string>Enable Air Input</string>
|
||||||
|
<key>Key</key>
|
||||||
|
<string>enableAir</string>
|
||||||
|
<key>DefaultValue</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>PSToggleSwitchSpecifier</string>
|
||||||
|
<key>Title</key>
|
||||||
|
<string>Auto Pop Menu</string>
|
||||||
|
<key>Key</key>
|
||||||
|
<string>autoPopMenu</string>
|
||||||
|
<key>DefaultValue</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>PSToggleSwitchSpecifier</string>
|
||||||
|
<key>Title</key>
|
||||||
|
<string>Invert Air Input Layout</string>
|
||||||
|
<key>Key</key>
|
||||||
|
<string>invertAir</string>
|
||||||
|
<key>DefaultValue</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>PSTitleValueSpecifier</string>
|
||||||
|
<key>DefaultValue</key>
|
||||||
|
<string></string>
|
||||||
|
<key>Title</key>
|
||||||
|
<string>Hold duration to open side menu</string>
|
||||||
|
<key>Key</key>
|
||||||
|
<string>menuDurationTitle</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>PSSliderSpecifier</string>
|
||||||
|
<key>Key</key>
|
||||||
|
<string>menuDuration</string>
|
||||||
|
<key>MinimumValue</key>
|
||||||
|
<real>0.5</real>
|
||||||
|
<key>DefaultValue</key>
|
||||||
|
<real>1</real>
|
||||||
|
<key>MaximumValue</key>
|
||||||
|
<real>2</real>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
|
@ -0,0 +1 @@
|
||||||
|
|
Binary file not shown.
|
@ -96,6 +96,7 @@
|
||||||
[server disconnect];
|
[server disconnect];
|
||||||
}
|
}
|
||||||
- (void)becomeActive {
|
- (void)becomeActive {
|
||||||
|
[self.parentVc becomeActive];
|
||||||
server.IPv4Enabled = YES;
|
server.IPv4Enabled = YES;
|
||||||
server.IPv6Enabled = YES;
|
server.IPv6Enabled = YES;
|
||||||
[self acceptConnection];
|
[self acceptConnection];
|
||||||
|
|
|
@ -29,8 +29,10 @@
|
||||||
UILabel *openCloseBtn;
|
UILabel *openCloseBtn;
|
||||||
UISwitch *enableAirToggle;
|
UISwitch *enableAirToggle;
|
||||||
BOOL airEnabled;
|
BOOL airEnabled;
|
||||||
UISwitch *autoPopToggle;
|
|
||||||
BOOL autoPopMenu;
|
BOOL autoPopMenu;
|
||||||
|
BOOL invertAir;
|
||||||
|
NSNumber *menuHoldDuration;
|
||||||
|
UILongPressGestureRecognizer *openCloseHold;
|
||||||
}
|
}
|
||||||
@property UIView *airIOView;
|
@property UIView *airIOView;
|
||||||
@property UIView *sliderIOView;
|
@property UIView *sliderIOView;
|
||||||
|
@ -40,6 +42,7 @@
|
||||||
-(void)connected;
|
-(void)connected;
|
||||||
-(void)disconnected;
|
-(void)disconnected;
|
||||||
-(void)becomeInactive;
|
-(void)becomeInactive;
|
||||||
|
-(void)becomeActive;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,12 @@
|
||||||
- (void)viewDidLoad {
|
- (void)viewDidLoad {
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
pendingHideStatus = NO;
|
pendingHideStatus = NO;
|
||||||
[NSUserDefaults.standardUserDefaults registerDefaults:@{@"enableAir":@YES, @"autoPopMenu":@YES}];
|
[NSUserDefaults.standardUserDefaults registerDefaults:@{
|
||||||
|
@"enableAir": @YES,
|
||||||
|
@"autoPopMenu": @YES,
|
||||||
|
@"invertAir": @NO,
|
||||||
|
@"menuDuration": @1.0
|
||||||
|
}];
|
||||||
funcViewOn = YES;
|
funcViewOn = YES;
|
||||||
openCloseEventOnce = NO;
|
openCloseEventOnce = NO;
|
||||||
|
|
||||||
|
@ -40,9 +45,8 @@
|
||||||
CGRect screenSize = [UIScreen mainScreen].bounds;
|
CGRect screenSize = [UIScreen mainScreen].bounds;
|
||||||
screenWidth = screenSize.size.width;
|
screenWidth = screenSize.size.width;
|
||||||
screenHeight = screenSize.size.height;
|
screenHeight = screenSize.size.height;
|
||||||
float offsetY = 0, sliderHeight = screenHeight;
|
float sliderHeight = screenHeight;
|
||||||
self.airIOView = [[UIView alloc] initWithFrame:CGRectMake(0, offsetY, screenWidth, screenHeight*0.4)];
|
self.airIOView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, screenWidth, screenHeight*0.4)];
|
||||||
offsetY += screenHeight*0.4;
|
|
||||||
self.sliderIOView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, screenWidth, sliderHeight)];
|
self.sliderIOView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, screenWidth, sliderHeight)];
|
||||||
self.airIOView.backgroundColor = [UIColor blackColor];
|
self.airIOView.backgroundColor = [UIColor blackColor];
|
||||||
self.airIOView.layer.borderWidth = 1.0f;
|
self.airIOView.layer.borderWidth = 1.0f;
|
||||||
|
@ -83,7 +87,7 @@
|
||||||
openCloseBtn.text = @"◀";
|
openCloseBtn.text = @"◀";
|
||||||
openCloseBtn.font = [UIFont systemFontOfSize:30];
|
openCloseBtn.font = [UIFont systemFontOfSize:30];
|
||||||
UITapGestureRecognizer *openCloseTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(closeFunc)];
|
UITapGestureRecognizer *openCloseTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(closeFunc)];
|
||||||
UILongPressGestureRecognizer *openCloseHold = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(openOrCloseFunc)];
|
openCloseHold = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(openOrCloseFunc)];
|
||||||
openCloseHold.minimumPressDuration = 1;
|
openCloseHold.minimumPressDuration = 1;
|
||||||
[openCloseBtnBorder addGestureRecognizer:openCloseTap];
|
[openCloseBtnBorder addGestureRecognizer:openCloseTap];
|
||||||
[openCloseBtnBorder addGestureRecognizer:openCloseHold];
|
[openCloseBtnBorder addGestureRecognizer:openCloseHold];
|
||||||
|
@ -106,7 +110,7 @@
|
||||||
}
|
}
|
||||||
UIView *enableAir;
|
UIView *enableAir;
|
||||||
UILabel *enableAirLabel;
|
UILabel *enableAirLabel;
|
||||||
enableAir = [[UIView alloc] initWithFrame:CGRectMake(0, 240, 200, 60)];
|
enableAir = [[UIView alloc] initWithFrame:CGRectMake(0, offset, 200, 60)];
|
||||||
enableAir.backgroundColor = [UIColor blackColor];
|
enableAir.backgroundColor = [UIColor blackColor];
|
||||||
enableAir.layer.borderColor = [UIColor whiteColor].CGColor;
|
enableAir.layer.borderColor = [UIColor whiteColor].CGColor;
|
||||||
enableAir.layer.borderWidth = 1.0;
|
enableAir.layer.borderWidth = 1.0;
|
||||||
|
@ -118,31 +122,20 @@
|
||||||
enableAirLabel.text = [[NSBundle mainBundle] localizedStringForKey:@"Enable Air Input" value:@"" table:nil];
|
enableAirLabel.text = [[NSBundle mainBundle] localizedStringForKey:@"Enable Air Input" value:@"" table:nil];
|
||||||
[enableAir addSubview:enableAirLabel];
|
[enableAir addSubview:enableAirLabel];
|
||||||
enableAirToggle = [[UISwitch alloc] initWithFrame:CGRectMake(135, 13, 50, 27)];
|
enableAirToggle = [[UISwitch alloc] initWithFrame:CGRectMake(135, 13, 50, 27)];
|
||||||
BOOL pref = [NSUserDefaults.standardUserDefaults boolForKey:@"enableAir"];
|
|
||||||
[enableAirToggle setOn:pref animated:NO];
|
|
||||||
[enableAirToggle addTarget:self action:@selector(enableAirChanged) forControlEvents:UIControlEventValueChanged];
|
|
||||||
[self updateAirEnabled:pref];
|
|
||||||
[enableAir addSubview:enableAirToggle];
|
[enableAir addSubview:enableAirToggle];
|
||||||
|
offset += 60;
|
||||||
|
|
||||||
UIView *autoPop;
|
FunctionButton *moreBtn = [[FunctionButton alloc] initAtY:offset];
|
||||||
UILabel *autoPopLabel;
|
offset += 60;
|
||||||
autoPop = [[UIView alloc] initWithFrame:CGRectMake(0, 300, 200, 60)];
|
moreBtn.name = @"more_setting_button";
|
||||||
autoPop.backgroundColor = [UIColor blackColor];
|
moreBtn.text = [[NSBundle mainBundle] localizedStringForKey:@"More..." value:@"" table:nil];
|
||||||
autoPop.layer.borderColor = [UIColor whiteColor].CGColor;
|
moreBtn.userInteractionEnabled = YES;
|
||||||
autoPop.layer.borderWidth = 1.0;
|
UITapGestureRecognizer *moreBtnTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(jumpToSetting)];
|
||||||
[functionBtnView addSubview:autoPop];
|
[moreBtn addGestureRecognizer:moreBtnTap];
|
||||||
autoPopLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 130, 60)];
|
[functionBtnView addSubview:moreBtn];
|
||||||
autoPopLabel.textAlignment = NSTextAlignmentRight;
|
|
||||||
autoPopLabel.textColor = [UIColor whiteColor];
|
[self loadPrefs];
|
||||||
autoPopLabel.numberOfLines = 1;
|
[enableAirToggle addTarget:self action:@selector(enableAirChanged) forControlEvents:UIControlEventValueChanged];
|
||||||
autoPopLabel.text = [[NSBundle mainBundle] localizedStringForKey:@"Auto Pop Menu" value:@"" table:nil];
|
|
||||||
[autoPop addSubview:autoPopLabel];
|
|
||||||
autoPopToggle = [[UISwitch alloc] initWithFrame:CGRectMake(135, 13, 50, 27)];
|
|
||||||
pref = [NSUserDefaults.standardUserDefaults boolForKey:@"autoPopMenu"];
|
|
||||||
[autoPopToggle setOn:pref animated:NO];
|
|
||||||
[autoPopToggle addTarget:self action:@selector(autoPopChanged) forControlEvents:UIControlEventValueChanged];
|
|
||||||
autoPopMenu = pref;
|
|
||||||
[autoPop addSubview:autoPopToggle];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,6 +186,24 @@
|
||||||
NSLog(@"server created");
|
NSLog(@"server created");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void)loadPrefs {
|
||||||
|
// enable air
|
||||||
|
BOOL pref = [NSUserDefaults.standardUserDefaults boolForKey:@"enableAir"];
|
||||||
|
[enableAirToggle setOn:pref animated:NO];
|
||||||
|
[self updateAirEnabled:pref];
|
||||||
|
|
||||||
|
// auto pop
|
||||||
|
autoPopMenu = [NSUserDefaults.standardUserDefaults boolForKey:@"autoPopMenu"];
|
||||||
|
|
||||||
|
// invert air
|
||||||
|
pref = [NSUserDefaults.standardUserDefaults boolForKey:@"invertAir"];
|
||||||
|
[self updateAirInverted:pref];
|
||||||
|
|
||||||
|
// hold duration
|
||||||
|
menuHoldDuration = [NSUserDefaults.standardUserDefaults valueForKey:@"menuDuration"];
|
||||||
|
openCloseHold.minimumPressDuration = [menuHoldDuration floatValue];
|
||||||
|
}
|
||||||
|
|
||||||
-(void)updateLed:(NSData*)rgbData {
|
-(void)updateLed:(NSData*)rgbData {
|
||||||
if (rgbData.length != 32*3) return;
|
if (rgbData.length != 32*3) return;
|
||||||
NSMutableArray *colorArr = [NSMutableArray arrayWithCapacity:33];
|
NSMutableArray *colorArr = [NSMutableArray arrayWithCapacity:33];
|
||||||
|
@ -225,10 +236,14 @@
|
||||||
airEnabled = enable;
|
airEnabled = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)autoPopChanged{
|
-(void)updateAirInverted:(BOOL)invert {
|
||||||
BOOL pref = autoPopToggle.on;
|
if (invertAir != invert) {
|
||||||
[NSUserDefaults.standardUserDefaults setBool:pref forKey:@"autoPopMenu"];
|
CGRect screenSize = [UIScreen mainScreen].bounds;
|
||||||
autoPopMenu = pref;
|
screenWidth = screenSize.size.width;
|
||||||
|
screenHeight = screenSize.size.height;
|
||||||
|
self.airIOView.frame = CGRectMake(0, invert ? screenHeight * 0.6 : 0, screenWidth, screenHeight * 0.4);
|
||||||
|
invertAir = invert;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)openOrCloseFunc {
|
-(void)openOrCloseFunc {
|
||||||
|
@ -262,6 +277,9 @@
|
||||||
[self sendIoBuf:&buf];
|
[self sendIoBuf:&buf];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
-(void)jumpToSetting {
|
||||||
|
[UIApplication.sharedApplication openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
|
||||||
|
}
|
||||||
|
|
||||||
-(BOOL)prefersStatusBarHidden { return kCFCoreFoundationVersionNumber < 1443.00; }
|
-(BOOL)prefersStatusBarHidden { return kCFCoreFoundationVersionNumber < 1443.00; }
|
||||||
-(UIRectEdge)preferredScreenEdgesDeferringSystemGestures { return UIRectEdgeAll; }
|
-(UIRectEdge)preferredScreenEdgesDeferringSystemGestures { return UIRectEdgeAll; }
|
||||||
|
@ -317,8 +335,17 @@
|
||||||
}
|
}
|
||||||
CGPoint point = [touch locationInView:nil];
|
CGPoint point = [touch locationInView:nil];
|
||||||
float pointX = screenWidth - point.x, pointY = point.y;
|
float pointX = screenWidth - point.x, pointY = point.y;
|
||||||
if (airEnabled && pointY < airHeight) {
|
BOOL inAirRange = airEnabled && (
|
||||||
int idx = pointY / airIOHeight;
|
(invertAir && pointY > screenHeight - airHeight) ||
|
||||||
|
(!invertAir && pointY < airHeight)
|
||||||
|
);
|
||||||
|
if (inAirRange) {
|
||||||
|
int idx;
|
||||||
|
if (invertAir) {
|
||||||
|
idx = (screenHeight - pointY) / airIOHeight;
|
||||||
|
} else {
|
||||||
|
idx = pointY / airIOHeight;
|
||||||
|
}
|
||||||
uint8_t airIdx[] = {4,5,2,3,0,1};
|
uint8_t airIdx[] = {4,5,2,3,0,1};
|
||||||
buf.air[airIdx[idx]] = 1;
|
buf.air[airIdx[idx]] = 1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -380,5 +407,8 @@
|
||||||
struct ioBuf buf = {0};
|
struct ioBuf buf = {0};
|
||||||
[self sendIoBuf:&buf];
|
[self sendIoBuf:&buf];
|
||||||
}
|
}
|
||||||
|
-(void)becomeActive {
|
||||||
|
[self loadPrefs];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -4,5 +4,5 @@
|
||||||
"Enable Air Input" = "启用Air输入";
|
"Enable Air Input" = "启用Air输入";
|
||||||
"Insert Coin" = "投币";
|
"Insert Coin" = "投币";
|
||||||
"Read Card" = "刷卡";
|
"Read Card" = "刷卡";
|
||||||
"Auto Pop Menu" = "自动弹出菜单";
|
"More..." = "更多设置…";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue