Lua API: Change PLATFORM to INTERFACE
authorWuzzy <Wuzzy2@mail.ru>
Mon, 26 Nov 2018 14:31:36 +0100
changeset 14297 a6c5ce147530
parent 14296 0855344f54a7
child 14298 00b56ec8b7df
Lua API: Change PLATFORM to INTERFACE
ChangeLog.txt
hedgewars/uScript.pas
--- a/ChangeLog.txt	Mon Nov 26 01:13:10 2018 +0100
+++ b/ChangeLog.txt	Mon Nov 26 14:31:36 2018 +0100
@@ -198,7 +198,7 @@
  + New global: MAX_HOG_HEALTH. Maximum possible hedgehog health
  + New global: MAX_TURN_TIME. Maximum possible turn time
  + New global: EXPLForceDraw. Flag for Explode function, forces land removal even with gfSolidLand on
- + New global: PLATFORM. Platform type. "Desktop" for desktop builds, "Mobile" for mobile device builds
+ + New global: INTERFACE. Type of the game interface: "desktop" for desktop, "touch" for touchscreen
  + New globals: capcolDefault, capcolSetting: Default caption colors
  * Animate library: Remove defunct follow argument for AnimVisualGear
  * Fixed variable: TotalRounds was -1 (instead of 0) in first real round after hog placement phase
--- a/hedgewars/uScript.pas	Mon Nov 26 01:13:10 2018 +0100
+++ b/hedgewars/uScript.pas	Mon Nov 26 14:31:36 2018 +0100
@@ -4005,10 +4005,10 @@
 // import some variables
 ScriptSetString(_S'LOCALE', cLocale);
 
-{$IFDEF MOBILE}
-ScriptSetString(_S'PLATFORM', 'Mobile');
+{$IFDEF USE_TOUCH_INTERFACE}
+ScriptSetString(_S'INTERFACE', 'touch');
 {$ELSE}
-ScriptSetString(_S'PLATFORM', 'Desktop');
+ScriptSetString(_S'INTERFACE', 'desktop');
 {$ENDIF}
 
 // Add aliases for amDuck and gtDuck because rubber duck was removed.