@@ -801,18 +801,22 @@ precision = 3;
801801
802802function ScriptHawk .decreasePrecision ()
803803 precision = math.max (0 , precision - 1 );
804+ forms .settext (ScriptHawk .UI .form_controls [" Precision Value Label" ], precision );
804805end
805806
806807function ScriptHawk .increasePrecision ()
807808 precision = math.min (12 , precision + 1 );
809+ forms .settext (ScriptHawk .UI .form_controls [" Precision Value Label" ], precision );
808810end
809811
810812function ScriptHawk .decreaseSpeed ()
811813 Game .speedy_index = math.max (1 , Game .speedy_index - 1 );
814+ forms .settext (ScriptHawk .UI .form_controls [" Speed Value Label" ], Game .speedy_speeds [Game .speedy_index ]);
812815end
813816
814817function ScriptHawk .increaseSpeed ()
815818 Game .speedy_index = math.min (# Game .speedy_speeds , Game .speedy_index + 1 );
819+ forms .settext (ScriptHawk .UI .form_controls [" Speed Value Label" ], Game .speedy_speeds [Game .speedy_index ]);
816820end
817821
818822ScriptHawk .movingAngle = 0.0 ;
@@ -985,6 +989,7 @@ local function toggleRotationUnits()
985989 else
986990 rotation_units = " Degrees" ;
987991 end
992+ forms .settext (ScriptHawk .UI .form_controls [" Toggle Rotation Units Button" ], rotation_units );
988993end
989994
990995function ScriptHawk .UI .formatRotation (num )
@@ -1012,6 +1017,7 @@ local function toggleMode()
10121017 else
10131018 ScriptHawk .mode = ' Position' ;
10141019 end
1020+ forms .settext (ScriptHawk .UI .form_controls [" Mode Button" ], ScriptHawk .mode );
10151021end
10161022
10171023---- -----------
@@ -1228,7 +1234,7 @@ function ScriptHawk.initUI(formTitle)
12281234 ScriptHawk .UI .form_controls [" Speed Label" ] = forms .label (ScriptHawk .UI .options_form , " Speed:" , ScriptHawk .UI .col (0 ), ScriptHawk .UI .row (2 ) + ScriptHawk .UI .label_offset , 54 , 14 );
12291235 ScriptHawk .UI .button ({4 , - 28 }, 2 , {ScriptHawk .UI .button_height }, nil , " Decrease Speed Button" , " -" , ScriptHawk .decreaseSpeed );
12301236 ScriptHawk .UI .button ({5 , - 28 }, 2 , {ScriptHawk .UI .button_height }, nil , " Increase Speed Button" , " +" , ScriptHawk .increaseSpeed );
1231- ScriptHawk .UI .form_controls [" Speed Value Label" ] = forms .label (ScriptHawk .UI .options_form , " 0 " , ScriptHawk .UI .col (5 ), ScriptHawk .UI .row (2 ) + ScriptHawk .UI .label_offset , 47 , 14 );
1237+ ScriptHawk .UI .form_controls [" Speed Value Label" ] = forms .label (ScriptHawk .UI .options_form , Game . speedy_speeds [ Game . speedy_index ] , ScriptHawk .UI .col (5 ), ScriptHawk .UI .row (2 ) + ScriptHawk .UI .label_offset , 47 , 14 );
12321238 end
12331239
12341240 if type (Game .maps ) == " table" then
@@ -1372,15 +1378,7 @@ local angleKeywords = {
13721378
13731379function ScriptHawk .UI .updateReadouts ()
13741380 -- Update form buttons etc
1375- forms .settext (ScriptHawk .UI .form_controls [" Precision Value Label" ], precision );
1376- forms .settext (ScriptHawk .UI .form_controls [" Toggle Rotation Units Button" ], rotation_units );
1377-
13781381 if not TASSafe then
1379- if ScriptHawk .dpad .joypad .enabled or ScriptHawk .dpad .key .enabled then
1380- forms .settext (ScriptHawk .UI .form_controls [" Speed Value Label" ], Game .speedy_speeds [Game .speedy_index ]);
1381- end
1382- forms .settext (ScriptHawk .UI .form_controls [" Mode Button" ], ScriptHawk .mode );
1383-
13841382 if type (Game .maps ) == " table" and previous_map ~= forms .gettext (ScriptHawk .UI .form_controls [" Map Dropdown" ]) then
13851383 previous_map = forms .gettext (ScriptHawk .UI .form_controls [" Map Dropdown" ]);
13861384 previous_map_value = ScriptHawk .UI .findMapValue ();
0 commit comments