mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 01:29:49 +00:00
Allow disabling ValueSlider
Maybe we should make theme changes as well when it's disabled, but it's fine for now.
This commit is contained in:
parent
fdfcd6ca1b
commit
5664271b27
|
@ -5,6 +5,7 @@ extends TextureProgress
|
||||||
|
|
||||||
enum { NORMAL, HELD, SLIDING, TYPING }
|
enum { NORMAL, HELD, SLIDING, TYPING }
|
||||||
|
|
||||||
|
export var editable := true
|
||||||
export var prefix: String
|
export var prefix: String
|
||||||
export var suffix: String
|
export var suffix: String
|
||||||
# Size of additional snapping (applied in addition to Range's step).
|
# Size of additional snapping (applied in addition to Range's step).
|
||||||
|
@ -31,6 +32,8 @@ func _ready() -> void:
|
||||||
|
|
||||||
|
|
||||||
func _gui_input(event: InputEvent) -> void:
|
func _gui_input(event: InputEvent) -> void:
|
||||||
|
if not editable:
|
||||||
|
return
|
||||||
if state == NORMAL:
|
if state == NORMAL:
|
||||||
if event is InputEventMouseButton and event.button_index == BUTTON_LEFT and event.pressed:
|
if event is InputEventMouseButton and event.button_index == BUTTON_LEFT and event.pressed:
|
||||||
state = HELD
|
state = HELD
|
||||||
|
|
|
@ -15,6 +15,8 @@ size_flags_horizontal = 3
|
||||||
theme_type_variation = "ValueSlider"
|
theme_type_variation = "ValueSlider"
|
||||||
texture_under = ExtResource( 2 )
|
texture_under = ExtResource( 2 )
|
||||||
texture_progress = ExtResource( 2 )
|
texture_progress = ExtResource( 2 )
|
||||||
|
tint_under = Color( 0, 0, 0, 1 )
|
||||||
|
tint_progress = Color( 0, 0, 0, 1 )
|
||||||
nine_patch_stretch = true
|
nine_patch_stretch = true
|
||||||
stretch_margin_left = 3
|
stretch_margin_left = 3
|
||||||
stretch_margin_top = 3
|
stretch_margin_top = 3
|
||||||
|
@ -28,8 +30,10 @@ anchor_bottom = 1.0
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
custom_styles/read_only = SubResource( 1 )
|
custom_styles/read_only = SubResource( 1 )
|
||||||
custom_styles/normal = SubResource( 1 )
|
custom_styles/normal = SubResource( 1 )
|
||||||
|
text = "0"
|
||||||
align = 1
|
align = 1
|
||||||
editable = false
|
editable = false
|
||||||
|
selecting_enabled = false
|
||||||
|
|
||||||
[connection signal="value_changed" from="." to="." method="_on_value_changed"]
|
[connection signal="value_changed" from="." to="." method="_on_value_changed"]
|
||||||
[connection signal="focus_exited" from="LineEdit" to="." method="_confirm_text"]
|
[connection signal="focus_exited" from="LineEdit" to="." method="_confirm_text"]
|
||||||
|
|
|
@ -780,8 +780,6 @@ rect_min_size = Vector2( 207, 24 )
|
||||||
size_flags_horizontal = 1
|
size_flags_horizontal = 1
|
||||||
size_flags_vertical = 0
|
size_flags_vertical = 0
|
||||||
value = 100.0
|
value = 100.0
|
||||||
tint_under = Color( 0, 0, 0, 1 )
|
|
||||||
tint_progress = Color( 0, 0, 0, 1 )
|
|
||||||
prefix = "Opacity:"
|
prefix = "Opacity:"
|
||||||
|
|
||||||
[node name="SpacerControl2" type="Control" parent="ScrollContainer/TimelineContainer/OpacityAndTagContainer"]
|
[node name="SpacerControl2" type="Control" parent="ScrollContainer/TimelineContainer/OpacityAndTagContainer"]
|
||||||
|
|
Loading…
Reference in a new issue