on screen widget shape - Chinese localization

This commit is contained in:
TrueZhuangjia
2025-03-22 12:49:35 +08:00
committed by TrueZhuanjia
parent eca0b30728
commit dd0ff298d5
2 changed files with 26 additions and 2 deletions
@@ -385,8 +385,9 @@
if(noValidKeyboardString && noValidMouseButtonString && noValidTouchPadString && noValidOscButtonString && noValidSpecialButtonString && noValidSuperComboButtonString && noValidSpecialGameWidgetString) return;
if([widgetShape isEqualToString:@"r"]) widgetShape = @"round";
if([widgetShape isEqualToString:@"s"]) widgetShape = @"square";
if([widgetShape isEqualToString:@""]) widgetShape = @"default";
else if([widgetShape isEqualToString:@"s"]) widgetShape = @"square";
else if([widgetShape isEqualToString:@""]) widgetShape = @"default";
else return;
//saving & present the keyboard button:
OnScreenWidgetView* widgetView = [[OnScreenWidgetView alloc] initWithKeyString:cmdString keyLabel:keyLabel shape:widgetShape];
widgetView.translatesAutoresizingMaskIntoConstraints = NO; // weird but this is mandatory, or you will find no key views added to the right place