diff options
author | jacopograndi <jacopo.grandi@outlook.it> | 2022-01-18 18:04:34 +0100 |
---|---|---|
committer | jacopograndi <jacopo.grandi@outlook.it> | 2022-01-18 18:04:34 +0100 |
commit | 0eb22020e380643ec5cd2c12f983403c2dd3b751 (patch) | |
tree | ff23a3e26611c04e3ba72c8c1504b9ae86dfdeb8 /scripts/gui_bottom_bar.gd | |
parent | f75ee64e21f67b4f27404147aedaa63750058d5a (diff) |
load map gui & start doc balance
Diffstat (limited to 'scripts/gui_bottom_bar.gd')
-rw-r--r-- | scripts/gui_bottom_bar.gd | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/gui_bottom_bar.gd b/scripts/gui_bottom_bar.gd index bd63a51..af987a4 100644 --- a/scripts/gui_bottom_bar.gd +++ b/scripts/gui_bottom_bar.gd @@ -5,10 +5,14 @@ var picker : Control var gui : Control +var load_map : Control +var map_name : Label + func _fetch (): if gui == null: gui = get_parent() if editor_bar == null: editor_bar = $editor_bar if picker == null: picker = $picker + if map_name == null: map_name = $editor_bar/hbox_map/mapname func refresh (in_editor : bool): _fetch() @@ -19,6 +23,8 @@ func refresh (in_editor : bool): editor_bar.visible = false picker.refresh() + + map_name.text = gui.saveload_map.mapname func _on_turrets_button_up(): gui.control.do(Globals.PlayerActions.CHANGE_TYPE, @@ -39,3 +45,14 @@ func _on_voxel_button_up(): func _on_palette_button_up(): gui.control.do(Globals.PlayerActions.CHANGE_TYPE, { "statetype": Globals.StateType.VOXEL_PALETTE }) + +func _on_save_button_up(): + gui.control.gui_save_map_event() + +func _on_load_button_up(): + gui.load_map.build() + gui.load_map.visible = true + +func _on_save_as_button_up(): + gui.save_as.popup() + gui.save_as.get_node("line_edit").grab_focus() |