GUI doesn't switch between iPhone and iPad artwork
by Andy Hawkins · in iTorque 2D · 08/05/2012 (3:01 am) · 2 replies
I've created two versions of the splash screen of my demo game for my students. It's a ball rolling game but I digress.
This is script below. Only problem is, it shows both the iPhone splash screen and the iPad version regardless of if I set the game to iPhone or iPad. Is the GUI broken? If it is, how can I detect in script what I'm running on, that way I can turn one or the other off.
This is script below. Only problem is, it shows both the iPhone splash screen and the iPad version regardless of if I set the game to iPhone or iPad. Is the GUI broken? If it is, how can I detect in script what I'm running on, that way I can turn one or the other off.
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(mainScreenGui) {
canSaveDynamicFields = "0";
PlatformTarget = "UNIVERSAL";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "0 0";
Extent = "1024 768";
MinExtent = "480 320";
canSave = "1";
Visible = "1";
hovertime = "1000";
new t2dSceneWindow(sceneWindow2D) {
canSaveDynamicFields = "0";
PlatformTarget = "UNIVERSAL";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "0 0";
Extent = "1024 768";
MinExtent = "480 320";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiDefaultProfile";
hovertime = "1000";
lockMouse = "0";
useWindowMouseEvents = "1";
useObjectMouseEvents = "1";
};
new GuiBitmapButtonCtrl(splashScreeniPad) {
canSaveDynamicFields = "0";
internalName = "splashScreeniPad";
PlatformTarget = "IPAD";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "0 0";
Extent = "1024 768";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "splashScreeniPad.setVisible(false);";
ToolTip = "Click Screen To Play";
hovertime = "1000";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "data/images/BlockmazeSplashScreen3.png";
};
new GuiBitmapButtonCtrl(splashScreeniPhone) {
canSaveDynamicFields = "0";
internalName = "splashScreeniPhone";
PlatformTarget = "IPHONE";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "0 0";
Extent = "480 320";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "splashScreeniPhone.setVisible(false);";
hovertime = "1000";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "data/images/BlockmazeSplashScreen3_iphone.png";
};
};
//--- OBJECT WRITE END ---
#2
08/05/2012 (8:57 am)
Also I found on the device itself it works properly. Just when testing through the iTorque2D editor it shows both.
Associate Andy Hawkins
DrewFX
if(($pref::iOS::DeviceType != $iOS::constant::iPad)) {