1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 15:39:49 +00:00

Merge pull request #154 from YeldhamDev/hide_animation_timeline

Add option to hide the animation timeline
This commit is contained in:
Manolis Papadeas 2020-02-15 15:03:22 +02:00 committed by GitHub
commit 742a98926c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -101,6 +101,8 @@ var draw_grid := false
var show_rulers := true var show_rulers := true
# warning-ignore:unused_class_variable # warning-ignore:unused_class_variable
var show_guides := true var show_guides := true
# warning-ignore:unused_class_variable
var show_animation_timeline := true
# Onion skinning options # Onion skinning options
# warning-ignore:unused_class_variable # warning-ignore:unused_class_variable

View file

@ -59,7 +59,8 @@ func _ready() -> void:
"Tile Mode" : KEY_MASK_CMD + KEY_T, "Tile Mode" : KEY_MASK_CMD + KEY_T,
"Show Grid" : KEY_MASK_CMD + KEY_G, "Show Grid" : KEY_MASK_CMD + KEY_G,
"Show Rulers" : KEY_MASK_CMD + KEY_R, "Show Rulers" : KEY_MASK_CMD + KEY_R,
"Show Guides" : KEY_MASK_CMD + KEY_F "Show Guides" : KEY_MASK_CMD + KEY_F,
"Show Animation Timeline" : 0
} }
var image_menu_items := { var image_menu_items := {
"Scale Image" : 0, "Scale Image" : 0,
@ -116,6 +117,7 @@ func _ready() -> void:
i += 1 i += 1
view_menu.set_item_checked(2, true) #Show Rulers view_menu.set_item_checked(2, true) #Show Rulers
view_menu.set_item_checked(3, true) #Show Guides view_menu.set_item_checked(3, true) #Show Guides
view_menu.set_item_checked(4, true) #Show Animation Timeline
view_menu.hide_on_checkable_item_selection = false view_menu.hide_on_checkable_item_selection = false
i = 0 i = 0
for item in image_menu_items.keys(): for item in image_menu_items.keys():
@ -274,6 +276,10 @@ func view_menu_id_pressed(id : int) -> void:
for guide in canvas.get_children(): for guide in canvas.get_children():
if guide is Guide: if guide is Guide:
guide.visible = Global.show_guides guide.visible = Global.show_guides
4: # Show animation timeline
Global.show_animation_timeline = !Global.show_animation_timeline
view_menu.set_item_checked(4, Global.show_animation_timeline)
$MenuAndUI/UI/CanvasAndTimeline/AnimationTimeline.visible = Global.show_animation_timeline
Global.canvas.update() Global.canvas.update()