--- a/hedgewars/uScript.pas Fri Sep 09 03:57:45 2011 +0200
+++ b/hedgewars/uScript.pas Fri Sep 09 15:36:30 2011 +0200
@@ -36,6 +36,7 @@
procedure ScriptLoad(name : shortstring);
procedure ScriptOnGameInit;
+procedure ScriptOnScreenResize();
procedure ScriptCall(fname : shortstring);
function ScriptCall(fname : shortstring; par1: LongInt) : LongInt;
@@ -1624,6 +1625,16 @@
ScriptSetInteger('TeamsCount', TeamsCount)
end;
+
+// Update values of screen dimensions and allow script to react to resolution change
+procedure ScriptOnScreenResize();
+begin
+ScriptSetInteger('ScreenHeight', cScreenHeight);
+ScriptSetInteger('ScreenWidth', cScreenWidth);
+ScriptCall('onScreenResize');
+end;
+
+
procedure ScriptLoad(name : shortstring);
var ret : LongInt;
s : shortstring;