Fix the opacity slider.

This commit is contained in:
Relintai 2020-11-30 15:14:53 +01:00
parent d5f9b5698c
commit 493731cfe9
5 changed files with 6 additions and 6 deletions

View File

@ -8,8 +8,6 @@
[ext_resource path="res://addons/draw_gd/src/Palette/NewPaletteDialog.tscn" type="PackedScene" id=6]
[ext_resource path="res://addons/draw_gd/src/Palette/EditPalettePopup.tscn" type="PackedScene" id=7]
[sub_resource type="ButtonGroup" id=1]
[node name="PalettePanelContainer" type="PanelContainer"]
@ -186,6 +184,8 @@ margin_left = 7.0
margin_top = 7.0
margin_right = 507.0
margin_bottom = 307.0
current_dir = "/home/relintai/Projects/draw_gd"
current_path = "/home/relintai/Projects/draw_gd/"
[node name="EditPalettePopup" parent="." instance=ExtResource( 7 )]
margin_left = 7.0
@ -251,6 +251,7 @@ selected = 0
margin_right = 200.0
margin_bottom = 70.0
dialog_text = "Are you sure you want to remove this palette? (Cannot be undone)"
[connection signal="pressed" from="PaletteVBoxContainer/CenterContainer/PaletteButtons/AddPalette" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_AddPalette_pressed"]
[connection signal="pressed" from="PaletteVBoxContainer/CenterContainer/PaletteButtons/EditPalette" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="on_edit_palette"]
[connection signal="pressed" from="PaletteVBoxContainer/CenterContainer/PaletteButtons/RemovePalette" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_RemovePalette_pressed"]

View File

@ -5,7 +5,6 @@
[ext_resource path="res://addons/draw_gd/src/UI/Canvas/Indicators.gd" type="Script" id=3]
[ext_resource path="res://addons/draw_gd/src/UI/Canvas/TileMode.gd" type="Script" id=4]
[node name="Canvas" type="Node2D"]
script = ExtResource( 1 )

View File

@ -2,9 +2,9 @@
[ext_resource path="res://addons/draw_gd/src/UI/Canvas/CanvasPreview.gd" type="Script" id=1]
[node name="CanvasPreview" type="Node2D"]
script = ExtResource( 1 )
[node name="AnimationTimer" type="Timer" parent="."]
[connection signal="timeout" from="AnimationTimer" to="." method="_on_AnimationTimer_timeout"]

View File

@ -11,7 +11,7 @@ shader = ExtResource( 5 )
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/offset = Vector2( 0, 0 )
shader_param/scale = Vector2( 1, 1 )
shader_param/rect_size = Vector2( 0, 0 )
shader_param/follow_movement = false

View File

@ -152,7 +152,7 @@ func _on_MergeDownLayer_pressed() -> void:
func _on_OpacitySlider_value_changed(value) -> void:
DrawGD.current_project.frames[DrawGD.current_project.current_frame].cels[DrawGD.current_project.current_layer].opacity = value / 100
DrawGD.current_project.frames.cels[DrawGD.current_project.current_layer].opacity = value / 100
DrawGD.layer_opacity_slider.value = value
DrawGD.layer_opacity_slider.value = value
DrawGD.layer_opacity_spinbox.value = value