Skip to content

Commit

Permalink
Handled other mods nuking my GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilka2 committed May 24, 2019
1 parent 192302f commit eb63d66
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 3.1.1
Date: 24. 05. 2019
Bugfixes:
- Handled other mods nuking my GUI.
---------------------------------------------------------------------------------------------------
Version: 3.1.0
Date: 24. 05. 2019
Features:
Expand Down
8 changes: 7 additions & 1 deletion control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,13 @@ script.on_event({defines.events.on_gui_click}, function(event)
local frame_flow = mod_gui.get_frame_flow(player)
local clicked_name = event.element.name
if clicked_name == "change-map-settings-toggle-config" then
frame_flow["change-map-settings-main-flow"].visible = not frame_flow["change-map-settings-main-flow"].visible
local main_flow = frame_flow["change-map-settings-main-flow"]
if not main_flow then
gui.regen(player)
set_to_current_all(player)
main_flow = frame_flow["change-map-settings-main-flow"]
end
main_flow.visible = not main_flow.visible
elseif clicked_name == "change-map-settings-start-button" then
if player.admin then
change_map_settings(player)
Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ChangeMapSettings",
"version": "3.1.0",
"version": "3.1.1",
"factorio_version" : "0.17",
"title": "Change Map Settings",
"author": "Bilka",
Expand Down
4 changes: 3 additions & 1 deletion map_gen_settings_gui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ map_gen_gui.create = function(parent)
local resource_scroll_pane = frame1.add{
type = "scroll-pane",
name = ENTIRE_PREFIX .. "resource-scroll-pane",
style ="scroll_pane_light"
}
resource_scroll_pane.style.maximal_height = 300
map_gen_gui.create_resource_table(resource_scroll_pane)
Expand All @@ -31,8 +32,9 @@ map_gen_gui.create = function(parent)
local terrain_scroll_pane = frame2.add{
type = "scroll-pane",
name = ENTIRE_PREFIX .. "terrain-scroll-pane",
style ="scroll_pane_light"
}
terrain_scroll_pane.style.maximal_height = 300
terrain_scroll_pane.style.maximal_height = 150
map_gen_gui.create_controls_with_scale_table(terrain_scroll_pane)
map_gen_gui.create_cliffs_table(frame2)
map_gen_gui.create_climate_table(frame2)
Expand Down

0 comments on commit eb63d66

Please sign in to comment.