hedgewars/uWorld.pas
changeset 6682 bf3cf6e60673
parent 6676 21cf35a570a7
child 6683 75a1d84ac606
--- a/hedgewars/uWorld.pas	Sun Feb 12 15:11:47 2012 -0500
+++ b/hedgewars/uWorld.pas	Mon Feb 13 08:18:59 2012 +0100
@@ -35,6 +35,7 @@
 procedure HideMission;
 procedure ShakeCamera(amount: LongInt);
 procedure InitCameraBorders;
+procedure InitTouchInterface;
 procedure MoveCamera;
 procedure onFocusStateChanged;
 
@@ -197,6 +198,16 @@
 SkyOffset:= 0;
 HorizontOffset:= 0;
 
+InitTouchInterface();
+end;
+
+procedure InitCameraBorders;
+begin
+cGearScrEdgesDist:= min(2 * cScreenHeight div 5, 2 * cScreenWidth div 5);
+end;
+
+procedure InitTouchInterface;
+begin
 {$IFDEF USE_TOUCH_INTERFACE}
 //positioning of the buttons
 buttonScale:= 1.5/cDefaultZoomLevel;
@@ -234,16 +245,9 @@
 arrowDownY:= -Round(spritesData[sprArrowDown].Texture^.h*buttonscale) + cScreenHeight;
 arrowDownW:= Round(spritesData[sprArrowDown].Texture^.w * buttonScale);
 arrowDownH:= Round(spritesData[sprArrowDown].Texture^.h * buttonScale);
-
-
 {$ENDIF}
 end;
 
-procedure InitCameraBorders;
-begin
-cGearScrEdgesDist:= min(2 * cScreenHeight div 5, 2 * cScreenWidth div 5);
-end;
-
 // for uStore texture resetting
 procedure ResetWorldTex;
 begin