diff --git a/control.lua b/control.lua index f490a86..8e9ebf5 100644 --- a/control.lua +++ b/control.lua @@ -415,7 +415,7 @@ local gui_change_handlers = { local settings = global[event.player_index] event.element.slider_value = math.floor(event.element.slider_value) settings.x = event.element.slider_value - event.element.parent.artillery_bombardment_x_textbox.text = event.element.slider_value + event.element.parent.artillery_bombardment_x_textbox.text = tostring(event.element.slider_value) end, artillery_bombardment_x_textbox = function(event) local settings = global[event.player_index] @@ -423,14 +423,14 @@ local gui_change_handlers = { settings.x = math.floor(tonumber(event.element.text)) event.element.parent.artillery_bombardment_x_slider.slider_value = tonumber(event.element.text) elseif not tonumber(event.element.text) and string.len(event.element.text) > 0 then - event.element.text = settings.x or event.element.parent.artillery_bombardment_x_slider.slider_value + event.element.text = tostring(settings.x or event.element.parent.artillery_bombardment_x_slider.slider_value) end end, artillery_bombardment_y_slider = function(event) local settings = global[event.player_index] event.element.slider_value = math.floor(event.element.slider_value) settings.y = event.element.slider_value - event.element.parent.artillery_bombardment_y_textbox.text = event.element.slider_value + event.element.parent.artillery_bombardment_y_textbox.text = tostring(event.element.slider_value) end, artillery_bombardment_y_textbox = function(event) local settings = global[event.player_index] @@ -438,14 +438,14 @@ local gui_change_handlers = { settings.y = math.floor(tonumber(event.element.text)) event.element.parent.artillery_bombardment_y_slider.slider_value = tonumber(event.element.text) elseif not tonumber(event.element.text) and string.len(event.element.text) > 0 then - event.element.text = settings.y or event.element.parent.artillery_bombardment_y_slider.slider_value + event.element.text = tostring(settings.y or event.element.parent.artillery_bombardment_y_slider.slider_value) end end, artillery_bombardment_column_slider = function(event) local settings = global[event.player_index] event.element.slider_value = math.floor(event.element.slider_value) settings.col_count = event.element.slider_value - event.element.parent.artillery_bombardment_column_textbox.text = event.element.slider_value + event.element.parent.artillery_bombardment_column_textbox.text = tostring(event.element.slider_value) end, artillery_bombardment_column_textbox = function(event) local settings = global[event.player_index] @@ -453,14 +453,14 @@ local gui_change_handlers = { settings.col_count = math.floor(tonumber(event.element.text)) event.element.parent.artillery_bombardment_column_slider.slider_value = tonumber(event.element.text) elseif not tonumber(event.element.text) and string.len(event.element.text) > 0 then - event.element.text = settings.col_count or event.element.parent.artillery_bombardment_column_slider.slider_value + event.element.text = tostring(settings.col_count or event.element.parent.artillery_bombardment_column_slider.slider_value) end end, artillery_bombardment_radius_slider = function(event) local settings = global[event.player_index] event.element.slider_value = math.floor(event.element.slider_value) settings.radius = event.element.slider_value - event.element.parent.artillery_bombardment_radius_textbox.text = event.element.slider_value + event.element.parent.artillery_bombardment_radius_textbox.text = tostring(event.element.slider_value) end, artillery_bombardment_radius_textbox = function(event) local settings = global[event.player_index] @@ -468,7 +468,7 @@ local gui_change_handlers = { settings.radius = math.floor(tonumber(event.element.text)) event.element.parent.artillery_bombardment_radius_slider.slider_value = tonumber(event.element.text) elseif not tonumber(event.element.text) and string.len(event.element.text) > 0 then - event.element.text = settings.radius or event.element.parent.artillery_bombardment_radius_slider.slider_value + event.element.text = tostring(settings.radius or event.element.parent.artillery_bombardment_radius_slider.slider_value) end end }