Created
October 9, 2012 23:00
-
-
Save agasiev/3862007 to your computer and use it in GitHub Desktop.
UI scale subsystem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "Settings.h" | |
@interface MainMenuScreen : MenuScreen { | |
@private | |
/* | |
Usage in code: | |
drButton * button = ...; | |
button.position = ui.menuButtons; | |
*/ | |
class MainMenuUI { | |
public: | |
CGPoint menuButtons; | |
MainMenuUI() { | |
if (Settings::device.name == iPhone || Settings::device.name == iPhoneRetina) { | |
menuButtons = ccp(0, 200); | |
} | |
else if (Settings::device.name == iPad || Settings::device.name == iPadRetina) { | |
menuButtons = ccp(0, 300); | |
} | |
}; | |
} ui; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment