mirror of
https://github.com/Relintai/draw_gd.git
synced 2025-02-01 07:17:03 +01:00
More cleanups.
This commit is contained in:
parent
7464f6ab46
commit
22256451b3
@ -17,7 +17,6 @@ onready var path_dialog_popup = $Popups/PathDialog
|
||||
onready var export_progress_popup = $Popups/ExportProgressBar
|
||||
onready var export_progress_bar = $Popups/ExportProgressBar/MarginContainer/ProgressBar
|
||||
|
||||
onready var animation_options_multiple_animations_directories = $VBoxContainer/AnimationOptions/MultipleAnimationsDirectories
|
||||
onready var previews = $VBoxContainer/PreviewPanel/PreviewScroll/Previews
|
||||
|
||||
onready var options_resize = $VBoxContainer/Options/Resize
|
||||
|
@ -2,12 +2,11 @@
|
||||
|
||||
[ext_resource path="res://addons/draw_gd/src/UI/NotificationLabel.gd" type="Script" id=2]
|
||||
|
||||
|
||||
|
||||
|
||||
[node name="NotificationLabel" type="Label"]
|
||||
modulate = Color( 1, 1, 1, 0 )
|
||||
margin_top = -100.0
|
||||
margin_right = 116.0
|
||||
margin_bottom = 14.0
|
||||
margin_bottom = -86.0
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
text = "Undo: Notification"
|
||||
script = ExtResource( 2 )
|
||||
@ -20,4 +19,5 @@ __meta__ = {
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
one_shot = true
|
||||
autostart = true
|
||||
|
||||
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
[ext_resource path="res://addons/draw_gd/src/UI/PatternButton.gd" type="Script" id=2]
|
||||
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=2]
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
bg_color = Color( 1, 1, 1, 1 )
|
||||
border_color = Color( 1, 1, 1, 1 )
|
||||
corner_radius_top_left = 5
|
||||
@ -12,7 +11,7 @@ corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
anti_aliasing = false
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
[sub_resource type="StyleBoxFlat" id=2]
|
||||
bg_color = Color( 1, 1, 1, 1 )
|
||||
border_color = Color( 1, 1, 1, 1 )
|
||||
corner_radius_top_left = 5
|
||||
@ -25,11 +24,11 @@ anti_aliasing = false
|
||||
margin_right = 32.0
|
||||
margin_bottom = 32.0
|
||||
rect_min_size = Vector2( 32, 32 )
|
||||
custom_styles/hover = SubResource( 2 )
|
||||
custom_styles/pressed = SubResource( 2 )
|
||||
custom_styles/focus = SubResource( 1 )
|
||||
custom_styles/disabled = SubResource( 1 )
|
||||
custom_styles/normal = SubResource( 2 )
|
||||
custom_styles/hover = SubResource( 1 )
|
||||
custom_styles/pressed = SubResource( 1 )
|
||||
custom_styles/focus = SubResource( 2 )
|
||||
custom_styles/disabled = SubResource( 2 )
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
button_mask = 7
|
||||
script = ExtResource( 2 )
|
||||
|
||||
@ -42,4 +41,5 @@ stretch_mode = 6
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="pressed" from="." to="." method="_on_PatternButton_pressed"]
|
||||
|
@ -62,9 +62,6 @@ func setup_file_menu() -> void:
|
||||
|
||||
file_menu.connect("id_pressed", self, "file_menu_id_pressed")
|
||||
|
||||
if OS.get_name() == "HTML5":
|
||||
file_menu.set_item_disabled(2, true)
|
||||
|
||||
|
||||
func setup_edit_menu() -> void:
|
||||
# var edit_menu_items := {
|
||||
@ -115,9 +112,7 @@ func setup_view_menu() -> void:
|
||||
"Show Grid" : 0,
|
||||
"Show Rulers" : 0,
|
||||
"Show Guides" : 0,
|
||||
"Show Animation Timeline" : 0,
|
||||
"Zen Mode" : 0,
|
||||
"Fullscreen Mode" : 0,
|
||||
}
|
||||
|
||||
view_menu = DrawGD.view_menu.get_popup()
|
||||
@ -129,11 +124,9 @@ func setup_view_menu() -> void:
|
||||
|
||||
view_menu.set_item_checked(2, true) # Show Rulers
|
||||
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.connect("id_pressed", self, "view_menu_id_pressed")
|
||||
|
||||
|
||||
func setup_image_menu() -> void:
|
||||
var image_menu_items := {
|
||||
"Scale Image" : 0,
|
||||
@ -260,12 +253,8 @@ func view_menu_id_pressed(id : int) -> void:
|
||||
toggle_show_rulers()
|
||||
3: # Show guides
|
||||
toggle_show_guides()
|
||||
4: # Show animation timeline
|
||||
toggle_show_anim_timeline()
|
||||
5: # Zen mode
|
||||
4: # Zen mode
|
||||
toggle_zen_mode()
|
||||
6: # Fullscreen mode
|
||||
toggle_fullscreen()
|
||||
|
||||
DrawGD.canvas.update()
|
||||
|
||||
@ -301,25 +290,12 @@ func toggle_show_guides() -> void:
|
||||
guide.visible = DrawGD.show_y_symmetry_axis and DrawGD.show_guides
|
||||
|
||||
|
||||
func toggle_show_anim_timeline() -> void:
|
||||
if zen_mode:
|
||||
return
|
||||
DrawGD.show_animation_timeline = !DrawGD.show_animation_timeline
|
||||
view_menu.set_item_checked(4, DrawGD.show_animation_timeline)
|
||||
DrawGD.animation_timeline.visible = DrawGD.show_animation_timeline
|
||||
|
||||
|
||||
func toggle_zen_mode() -> void:
|
||||
DrawGD.control.get_node("MenuAndUI/UI/ToolPanel").visible = zen_mode
|
||||
DrawGD.control.get_node("MenuAndUI/UI/RightPanel").visible = zen_mode
|
||||
DrawGD.control.get_node("MenuAndUI/UI/CanvasAndTimeline/ViewportAndRulers/TabsContainer").visible = zen_mode
|
||||
#DrawGD.control.get_node("MenuAndUI/UI/CanvasAndTimeline/ViewportAndRulers/TabsContainer").visible = zen_mode
|
||||
zen_mode = !zen_mode
|
||||
view_menu.set_item_checked(5, zen_mode)
|
||||
|
||||
|
||||
func toggle_fullscreen() -> void:
|
||||
OS.window_fullscreen = !OS.window_fullscreen
|
||||
view_menu.set_item_checked(6, OS.window_fullscreen)
|
||||
view_menu.set_item_checked(4, zen_mode)
|
||||
|
||||
|
||||
func image_menu_id_pressed(id : int) -> void:
|
||||
|
Loading…
Reference in New Issue
Block a user