mirror of
https://github.com/Relintai/draw_gd.git
synced 2025-02-01 07:17:03 +01:00
Removed play button from the minimap.
This commit is contained in:
parent
7cf6ced375
commit
175948b4ac
@ -4,7 +4,6 @@ extends PanelContainer
|
||||
|
||||
onready var canvas_preview = $HBoxContainer/PreviewViewportContainer/Viewport/CanvasPreview
|
||||
onready var camera : Camera2D = $HBoxContainer/PreviewViewportContainer/Viewport/CameraPreview
|
||||
onready var play_button : Button = $HBoxContainer/VBoxContainer/PlayButton
|
||||
|
||||
var DrawGD : Node = null
|
||||
|
||||
@ -13,14 +12,3 @@ func _on_PreviewZoomSlider_value_changed(value : float) -> void:
|
||||
camera.save_values_to_project()
|
||||
camera.update_transparent_checker_offset()
|
||||
|
||||
|
||||
func _on_PlayButton_toggled(button_pressed : bool) -> void:
|
||||
if button_pressed:
|
||||
if DrawGD.current_project.frames.size() <= 1:
|
||||
play_button.pressed = false
|
||||
return
|
||||
canvas_preview.animation_timer.start()
|
||||
DrawGD.change_button_texturerect(play_button.get_child(0), "pause.png")
|
||||
else:
|
||||
canvas_preview.animation_timer.stop()
|
||||
DrawGD.change_button_texturerect(play_button.get_child(0), "play.png")
|
||||
|
@ -1,21 +1,18 @@
|
||||
[gd_scene load_steps=8 format=2]
|
||||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://addons/draw_gd/src/UI/Canvas/CanvasPreview.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://addons/draw_gd/src/UI/TransparentChecker.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://addons/draw_gd/src/UI/CanvasPreviewContainer.gd" type="Script" id=3]
|
||||
[ext_resource path="res://addons/draw_gd/src/UI/Canvas/CameraMovement.gd" type="Script" id=4]
|
||||
[ext_resource path="res://addons/draw_gd/src/Shaders/TransparentChecker.shader" type="Shader" id=5]
|
||||
[ext_resource path="res://addons/draw_gd/assets/graphics/dark_themes/timeline/play.png" type="Texture" id=7]
|
||||
|
||||
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=1]
|
||||
shader = ExtResource( 5 )
|
||||
shader_param/size = 10.0
|
||||
shader_param/color1 = Color( 0.7, 0.7, 0.7, 1 )
|
||||
shader_param/color2 = Color( 1, 1, 1, 1 )
|
||||
shader_param/offset = Vector2( 0, 0 )
|
||||
shader_param/scale = Vector2( 0, 0 )
|
||||
shader_param/size = 10
|
||||
shader_param/color1 = Color( 0.47, 0.47, 0.47, 1 )
|
||||
shader_param/color2 = Color( 0.34, 0.35, 0.34, 1 )
|
||||
shader_param/offset = Vector2( 0, 150 )
|
||||
shader_param/scale = Vector2( 1, 1 )
|
||||
shader_param/rect_size = Vector2( 0, 0 )
|
||||
shader_param/follow_movement = false
|
||||
shader_param/follow_scale = false
|
||||
@ -37,64 +34,38 @@ margin_right = 293.0
|
||||
margin_bottom = 157.0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
|
||||
margin_right = 20.0
|
||||
margin_right = 16.0
|
||||
margin_bottom = 150.0
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer/VBoxContainer"]
|
||||
margin_left = 6.0
|
||||
margin_right = 14.0
|
||||
margin_left = 4.0
|
||||
margin_right = 12.0
|
||||
margin_bottom = 14.0
|
||||
size_flags_horizontal = 4
|
||||
text = "+"
|
||||
align = 1
|
||||
|
||||
[node name="PreviewZoomSlider" type="VSlider" parent="HBoxContainer/VBoxContainer"]
|
||||
margin_left = 2.0
|
||||
margin_top = 18.0
|
||||
margin_right = 18.0
|
||||
margin_bottom = 108.0
|
||||
margin_right = 16.0
|
||||
margin_bottom = 132.0
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 3
|
||||
step = 0.01
|
||||
|
||||
[node name="Label2" type="Label" parent="HBoxContainer/VBoxContainer"]
|
||||
margin_left = 7.0
|
||||
margin_top = 112.0
|
||||
margin_right = 12.0
|
||||
margin_bottom = 126.0
|
||||
margin_left = 5.0
|
||||
margin_top = 136.0
|
||||
margin_right = 10.0
|
||||
margin_bottom = 150.0
|
||||
size_flags_horizontal = 4
|
||||
text = "-"
|
||||
align = 1
|
||||
|
||||
[node name="PlayButton" type="Button" parent="HBoxContainer/VBoxContainer" groups=[
|
||||
"UIButtons",
|
||||
]]
|
||||
margin_top = 130.0
|
||||
margin_right = 20.0
|
||||
margin_bottom = 150.0
|
||||
rect_min_size = Vector2( 20, 0 )
|
||||
mouse_default_cursor_shape = 2
|
||||
toggle_mode = true
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="HBoxContainer/VBoxContainer/PlayButton"]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -3.5
|
||||
margin_top = -6.0
|
||||
margin_right = 3.5
|
||||
margin_bottom = 6.0
|
||||
mouse_default_cursor_shape = 2
|
||||
texture = ExtResource( 7 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="PreviewViewportContainer" type="ViewportContainer" parent="HBoxContainer"]
|
||||
margin_left = 24.0
|
||||
margin_right = 284.0
|
||||
margin_left = 20.0
|
||||
margin_right = 280.0
|
||||
margin_bottom = 150.0
|
||||
rect_min_size = Vector2( 0, 150 )
|
||||
|
||||
@ -114,5 +85,5 @@ offset = Vector2( 32, 32 )
|
||||
current = true
|
||||
zoom = Vector2( 0.15, 0.15 )
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[connection signal="value_changed" from="HBoxContainer/VBoxContainer/PreviewZoomSlider" to="." method="_on_PreviewZoomSlider_value_changed"]
|
||||
[connection signal="toggled" from="HBoxContainer/VBoxContainer/PlayButton" to="." method="_on_PlayButton_toggled"]
|
||||
|
Loading…
Reference in New Issue
Block a user