mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Check the correct tile mode button in View > Tile Mode when changing between projects
Also changed the buttons to radiobuttons
This commit is contained in:
parent
cf35060e74
commit
46939bd74d
|
@ -221,11 +221,11 @@ func _ready() -> void:
|
||||||
|
|
||||||
tile_mode_submenu = PopupMenu.new()
|
tile_mode_submenu = PopupMenu.new()
|
||||||
tile_mode_submenu.set_name("tile_mode_submenu")
|
tile_mode_submenu.set_name("tile_mode_submenu")
|
||||||
tile_mode_submenu.add_check_item("None", 0)
|
tile_mode_submenu.add_radio_check_item("None", 0)
|
||||||
tile_mode_submenu.set_item_checked(0, true)
|
tile_mode_submenu.set_item_checked(0, true)
|
||||||
tile_mode_submenu.add_check_item("Tiled In Both Axis", 1)
|
tile_mode_submenu.add_radio_check_item("Tiled In Both Axis", 1)
|
||||||
tile_mode_submenu.add_check_item("Tiled In X Axis", 2)
|
tile_mode_submenu.add_radio_check_item("Tiled In X Axis", 2)
|
||||||
tile_mode_submenu.add_check_item("Tiled In Y Axis", 3)
|
tile_mode_submenu.add_radio_check_item("Tiled In Y Axis", 3)
|
||||||
tile_mode_submenu.hide_on_checkable_item_selection = false
|
tile_mode_submenu.hide_on_checkable_item_selection = false
|
||||||
|
|
||||||
new_image_dialog = find_node_by_name(root, "CreateNewImage")
|
new_image_dialog = find_node_by_name(root, "CreateNewImage")
|
||||||
|
|
|
@ -206,6 +206,13 @@ func change_project() -> void:
|
||||||
else:
|
else:
|
||||||
Global.file_menu.get_popup().set_item_text(6, tr("Export") + " %s" % (file_name + Export.file_format_string(file_format)))
|
Global.file_menu.get_popup().set_item_text(6, tr("Export") + " %s" % (file_name + Export.file_format_string(file_format)))
|
||||||
|
|
||||||
|
for j in range(len(Global.Tile_Mode)):
|
||||||
|
if j != tile_mode:
|
||||||
|
Global.tile_mode_submenu.set_item_checked(j, false)
|
||||||
|
else:
|
||||||
|
Global.tile_mode_submenu.set_item_checked(j, true)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func serialize() -> Dictionary:
|
func serialize() -> Dictionary:
|
||||||
var layer_data := []
|
var layer_data := []
|
||||||
|
|
|
@ -271,7 +271,7 @@ func view_menu_id_pressed(id : int) -> void:
|
||||||
Global.canvas.update()
|
Global.canvas.update()
|
||||||
|
|
||||||
|
|
||||||
func tile_mode_submenu_id_pressed(id : int):
|
func tile_mode_submenu_id_pressed(id : int) -> void:
|
||||||
Global.transparent_checker._init_position(id)
|
Global.transparent_checker._init_position(id)
|
||||||
for i in range(len(Global.Tile_Mode)):
|
for i in range(len(Global.Tile_Mode)):
|
||||||
if i != id:
|
if i != id:
|
||||||
|
|
Loading…
Reference in a new issue