Skip to content

Commit

Permalink
Options: HSliders, via custom images. Looks 👌
Browse files Browse the repository at this point in the history
  • Loading branch information
nightblade9 committed Jun 28, 2022
1 parent 77514d9 commit a7bbe30
Show file tree
Hide file tree
Showing 8 changed files with 125 additions and 21 deletions.
Binary file added source/assets/images/ui/hslider-grabber-disabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions source/assets/images/ui/hslider-grabber-disabled.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/hslider-grabber-disabled.png-2d3bb3e883e57ac0109e14aeee8223c9.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/images/ui/hslider-grabber-disabled.png"
dest_files=[ "res://.import/hslider-grabber-disabled.png-2d3bb3e883e57ac0109e14aeee8223c9.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Binary file added source/assets/images/ui/hslider-grabber-selected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions source/assets/images/ui/hslider-grabber-selected.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/hslider-grabber-selected.png-c201df17b6014c4dae178143951e170f.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/images/ui/hslider-grabber-selected.png"
dest_files=[ "res://.import/hslider-grabber-selected.png-c201df17b6014c4dae178143951e170f.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Binary file added source/assets/images/ui/hslider-grabber.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions source/assets/images/ui/hslider-grabber.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/hslider-grabber.png-c904667d4612d3afdc430de8dc207b39.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/images/ui/hslider-grabber.png"
dest_files=[ "res://.import/hslider-grabber.png-c904667d4612d3afdc430de8dc207b39.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
31 changes: 12 additions & 19 deletions source/contexts/options/OptionsDialog.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[gd_scene load_steps=3 format=2]
[gd_scene load_steps=2 format=2]

[ext_resource path="res://contexts/options/OptionsDialog.gd" type="Script" id=1]
[ext_resource path="res://icon.png" type="Texture" id=4]

[node name="Options" type="CanvasLayer"]
pause_mode = 2
Expand Down Expand Up @@ -37,48 +36,42 @@ text = "Background Ambience Volume"
[node name="AmbienceVolumeSlider" type="HSlider" parent="WindowDialog/MarginContainer/VBoxContainer" groups=["GamepadSelectable"]]
margin_top = 43.0
margin_right = 624.0
margin_bottom = 107.0
custom_icons/grabber_disabled = ExtResource( 4 )
custom_icons/grabber_highlight = ExtResource( 4 )
custom_icons/grabber = ExtResource( 4 )
margin_bottom = 59.0
max_value = 1.0
step = 0.1
value = 1.0
tick_count = 10

[node name="SfxVolume" type="Label" parent="WindowDialog/MarginContainer/VBoxContainer"]
margin_top = 111.0
margin_top = 63.0
margin_right = 624.0
margin_bottom = 150.0
margin_bottom = 102.0
text = "Sound Effects Volume"

[node name="SoundEffectsVolumeSlider" type="HSlider" parent="WindowDialog/MarginContainer/VBoxContainer" groups=["GamepadSelectable"]]
margin_top = 154.0
margin_top = 106.0
margin_right = 624.0
margin_bottom = 218.0
custom_icons/grabber_disabled = ExtResource( 4 )
custom_icons/grabber_highlight = ExtResource( 4 )
custom_icons/grabber = ExtResource( 4 )
margin_bottom = 122.0
max_value = 1.0
step = 0.1
value = 1.0
tick_count = 10

[node name="HSeparator" type="HSeparator" parent="WindowDialog/MarginContainer/VBoxContainer"]
margin_top = 222.0
margin_top = 126.0
margin_right = 624.0
margin_bottom = 226.0
margin_bottom = 130.0

[node name="InvincibilityCheck" type="CheckButton" parent="WindowDialog/MarginContainer/VBoxContainer" groups=["GamepadSelectable"]]
margin_top = 230.0
margin_top = 134.0
margin_right = 624.0
margin_bottom = 277.0
margin_bottom = 181.0
text = "Invincibility"

[node name="ScreenShakeCheck" type="CheckButton" parent="WindowDialog/MarginContainer/VBoxContainer" groups=["GamepadSelectable"]]
margin_top = 281.0
margin_top = 185.0
margin_right = 624.0
margin_bottom = 328.0
margin_bottom = 232.0
pressed = true
text = "Screen Shake"

Expand Down
10 changes: 8 additions & 2 deletions source/theme/GlobalTheme.tres
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
[gd_resource type="Theme" load_steps=2 format=2]
[gd_resource type="Theme" load_steps=5 format=2]

[ext_resource path="res://assets/images/ui/hslider-grabber.png" type="Texture" id=1]
[ext_resource path="res://assets/images/ui/hslider-grabber-selected.png" type="Texture" id=2]
[ext_resource path="res://assets/images/ui/hslider-grabber-disabled.png" type="Texture" id=3]

[sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 0.24, 0.48, 0.6, 1 )

[resource]
Button/styles/focus = SubResource( 1 )
CheckButton/styles/focus = SubResource( 1 )
HSlider/styles/slider = SubResource( 1 )
HSlider/icons/grabber = ExtResource( 1 )
HSlider/icons/grabber_disabled = ExtResource( 3 )
HSlider/icons/grabber_highlight = ExtResource( 2 )

0 comments on commit a7bbe30

Please sign in to comment.