update audio player
This commit is contained in:
BIN
core/main_scene_ui/assets/audio_player_empty.png
Normal file
BIN
core/main_scene_ui/assets/audio_player_empty.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
40
core/main_scene_ui/assets/audio_player_empty.png.import
Normal file
40
core/main_scene_ui/assets/audio_player_empty.png.import
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bgrmy57xhg2gj"
|
||||||
|
path="res://.godot/imported/audio_player_empty.png-1b3b0e9bc78b192baac137114b08b7cd.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://core/main_scene_ui/assets/audio_player_empty.png"
|
||||||
|
dest_files=["res://.godot/imported/audio_player_empty.png-1b3b0e9bc78b192baac137114b08b7cd.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
BIN
core/main_scene_ui/assets/audio_player_wheel.png
Normal file
BIN
core/main_scene_ui/assets/audio_player_wheel.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
40
core/main_scene_ui/assets/audio_player_wheel.png.import
Normal file
40
core/main_scene_ui/assets/audio_player_wheel.png.import
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://s8pp2i6bjkps"
|
||||||
|
path="res://.godot/imported/audio_player_wheel.png-5a27c557d9f373382107e3f2bececfee.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://core/main_scene_ui/assets/audio_player_wheel.png"
|
||||||
|
dest_files=["res://.godot/imported/audio_player_wheel.png-5a27c557d9f373382107e3f2bececfee.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
@@ -1,53 +1,90 @@
|
|||||||
extends Control
|
extends Control
|
||||||
|
|
||||||
@export var radio: Radio
|
@export var radio: Radio
|
||||||
|
@export var scroll_speed: float = 60.0
|
||||||
|
@export var wheel_speed: float = -2.0
|
||||||
|
|
||||||
@onready var track_label: Label = $%TrackLabel
|
@onready var track_label: Label = $%TrackLabel
|
||||||
@onready var prev_track_icon_button: Button = $%PrevTrackIconButton
|
@onready var prev_track_button: Button = $%PrevTrackButton
|
||||||
@onready var play_pause_icon_button: Button = $%PlayPauseIconButton
|
@onready var play_track_button: Button = $%PlayTrackButton
|
||||||
@onready var next_track_icon_button: Button = $%NextTrackIconButton
|
@onready var pause_track_button: Button = $%PauseTrackButton
|
||||||
@onready var increase_volume_icon_button: Button = $%IncreaseVolumeIconButton
|
@onready var next_track_button: Button = $%NextTrackButton
|
||||||
@onready var decrease_volume_icon_button: Button = $%DecreaseVolumeIconButton
|
@onready var increase_volume_button: Button = $%IncreaseVolumeButton
|
||||||
|
@onready var decrease_volume_button: Button = $%DecreaseVolumeButton
|
||||||
|
@onready var left_wheel: TextureRect = $%LeftWheel
|
||||||
|
@onready var right_wheel: TextureRect = $%RightWheel
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
prev_track_icon_button.pressed.connect(_on_prev_track_icon_button_pressed)
|
prev_track_button.pressed.connect(_on_prev_track_button_pressed)
|
||||||
play_pause_icon_button.pressed.connect(_on_play_pause_icon_button_pressed)
|
play_track_button.pressed.connect(_on_play_track_button_pressed)
|
||||||
next_track_icon_button.pressed.connect(_on_next_track_icon_button_pressed)
|
pause_track_button.pressed.connect(_on_pause_track_button_pressed)
|
||||||
increase_volume_icon_button.pressed.connect(_on_increase_volume_icon_button_pressed)
|
next_track_button.pressed.connect(_on_next_track_button_pressed)
|
||||||
decrease_volume_icon_button.pressed.connect(_on_decrease_volume_icon_button_pressed)
|
increase_volume_button.pressed.connect(_on_increase_volume_button_pressed)
|
||||||
|
decrease_volume_button.pressed.connect(_on_decrease_volume_button_pressed)
|
||||||
if radio:
|
if radio:
|
||||||
radio.track_changed.connect(_on_radio_track_changed)
|
radio.track_changed.connect(_on_radio_track_changed)
|
||||||
if radio.stream and radio.stream.resource_path:
|
if radio.stream and radio.stream.resource_path:
|
||||||
track_label.text = radio.stream.resource_path.get_file().get_basename().capitalize()
|
track_label.text = radio.stream.resource_path.get_file().get_basename().capitalize()
|
||||||
play_pause_icon_button.image = play_pause_icon_button.images[1]
|
|
||||||
else:
|
else:
|
||||||
track_label.text = "Unknown Track"
|
track_label.text = "Unknown Track"
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
if radio and radio.playing and not radio.stream_paused:
|
||||||
|
if left_wheel:
|
||||||
|
left_wheel.rotation += wheel_speed * delta
|
||||||
|
if right_wheel:
|
||||||
|
right_wheel.rotation += wheel_speed * delta
|
||||||
|
|
||||||
|
if track_label and track_label.get_parent_control():
|
||||||
|
track_label.position.x += scroll_speed * delta
|
||||||
|
|
||||||
|
var text_width = track_label.get_minimum_size().x
|
||||||
|
|
||||||
|
var text_left_edge = track_label.position.x + (track_label.size.x - text_width) / 2.0
|
||||||
|
|
||||||
|
if text_left_edge > track_label.get_parent_control().size.x:
|
||||||
|
track_label.position.x = -(track_label.size.x + text_width) / 2.0
|
||||||
|
|
||||||
func _on_radio_track_changed(track_name: String) -> void:
|
func _on_radio_track_changed(track_name: String) -> void:
|
||||||
track_label.text = track_name
|
track_label.text = track_name
|
||||||
play_pause_icon_button.image = play_pause_icon_button.images[1]
|
|
||||||
|
|
||||||
func _on_prev_track_icon_button_pressed() -> void:
|
func _play_button_tween() -> void:
|
||||||
|
TweenFX.stop_all(self)
|
||||||
|
scale = Vector2.ONE
|
||||||
|
rotation = 0.0
|
||||||
|
modulate.a = 1.0
|
||||||
|
TweenFX.press_rotate(self)
|
||||||
|
|
||||||
|
func _on_prev_track_button_pressed() -> void:
|
||||||
if radio:
|
if radio:
|
||||||
radio.prev_track()
|
radio.prev_track()
|
||||||
|
_play_button_tween()
|
||||||
|
|
||||||
func _on_play_pause_icon_button_pressed() -> void:
|
func _on_play_track_button_pressed() -> void:
|
||||||
|
if radio:
|
||||||
|
if !radio.stream:
|
||||||
|
radio.next_track()
|
||||||
|
else:
|
||||||
|
radio.unpause()
|
||||||
|
_play_button_tween()
|
||||||
|
|
||||||
|
func _on_pause_track_button_pressed() -> void:
|
||||||
if radio:
|
if radio:
|
||||||
if radio.stream:
|
if radio.stream:
|
||||||
radio.toggle_pause()
|
radio.pause()
|
||||||
else:
|
_play_button_tween()
|
||||||
radio.next_track()
|
|
||||||
var play_pause_index = 0 if radio.stream_paused else 1
|
|
||||||
play_pause_icon_button.image = play_pause_icon_button.images[play_pause_index]
|
|
||||||
|
|
||||||
func _on_next_track_icon_button_pressed() -> void:
|
func _on_next_track_button_pressed() -> void:
|
||||||
if radio:
|
if radio:
|
||||||
radio.next_track()
|
radio.next_track()
|
||||||
|
_play_button_tween()
|
||||||
|
|
||||||
func _on_increase_volume_icon_button_pressed() -> void:
|
func _on_increase_volume_button_pressed() -> void:
|
||||||
var current_vol = AudioManager.get_audio_bus_volume("Music", 1.0)
|
var current_vol = AudioManager.get_audio_bus_volume("Music", 1.0)
|
||||||
AudioManager.set_audio_bus_volume("Music", current_vol + 0.1)
|
AudioManager.set_audio_bus_volume("Music", current_vol + 0.1)
|
||||||
|
_play_button_tween()
|
||||||
|
|
||||||
func _on_decrease_volume_icon_button_pressed() -> void:
|
func _on_decrease_volume_button_pressed() -> void:
|
||||||
var current_vol = AudioManager.get_audio_bus_volume("Music", 1.0)
|
var current_vol = AudioManager.get_audio_bus_volume("Music", 1.0)
|
||||||
AudioManager.set_audio_bus_volume("Music", current_vol - 0.1)
|
AudioManager.set_audio_bus_volume("Music", current_vol - 0.1)
|
||||||
|
_play_button_tween()
|
||||||
|
|||||||
@@ -1,132 +1,157 @@
|
|||||||
[gd_scene format=3 uid="uid://dg4f3v0ukpmay"]
|
[gd_scene format=3 uid="uid://dg4f3v0ukpmay"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://c4kekqicrv4m8" path="res://core/main_scene_ui/audio_player.gd" id="1_i2mrl"]
|
[ext_resource type="Script" uid="uid://c4kekqicrv4m8" path="res://core/main_scene_ui/audio_player.gd" id="1_i2mrl"]
|
||||||
[ext_resource type="PackedScene" uid="uid://2tqofxxxnvhv" path="res://core/main_scene_ui/icon_button.tscn" id="1_ucnyb"]
|
|
||||||
[ext_resource type="Theme" uid="uid://bg8megpn77mod" path="res://core/font/main_theme.tres" id="2_0koyu"]
|
[ext_resource type="Theme" uid="uid://bg8megpn77mod" path="res://core/font/main_theme.tres" id="2_0koyu"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cqx45c744325t" path="res://core/main_scene_ui/assets/button_audio_previous.png" id="3_netjv"]
|
[ext_resource type="Texture2D" uid="uid://s8pp2i6bjkps" path="res://core/main_scene_ui/assets/audio_player_wheel.png" id="4_n5r1o"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bdnevc7ewu5qe" path="res://core/main_scene_ui/assets/button_audio_play.png" id="4_urwwp"]
|
[ext_resource type="Texture2D" uid="uid://bgrmy57xhg2gj" path="res://core/main_scene_ui/assets/audio_player_empty.png" id="10_xv7rp"]
|
||||||
[ext_resource type="Texture2D" uid="uid://d2ft1kea45hec" path="res://core/main_scene_ui/assets/button_audio_next.png" id="5_0koyu"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://vx7wa6afj4ri" path="res://core/main_scene_ui/assets/button_audio_pause.png" id="5_urwwp"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://b0mir57askv7j" path="res://core/main_scene_ui/assets/button_audio_on.png" id="6_xv7rp"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dbxhxvvg4s8ru" path="res://core/main_scene_ui/assets/button_audio_off.png" id="7_7ib2x"]
|
|
||||||
|
|
||||||
[node name="AudioPlayer" type="Control" unique_id=425192018]
|
[node name="AudioPlayer" type="Control" unique_id=425192018]
|
||||||
|
custom_minimum_size = Vector2(241, 179)
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchor_right = 0.15208334
|
anchor_right = 0.12552084
|
||||||
anchor_bottom = 0.10925926
|
anchor_bottom = 0.16574074
|
||||||
|
offset_right = -241.00002
|
||||||
|
offset_bottom = -179.0
|
||||||
|
pivot_offset_ratio = Vector2(0.5, 0.5)
|
||||||
|
mouse_filter = 2
|
||||||
script = ExtResource("1_i2mrl")
|
script = ExtResource("1_i2mrl")
|
||||||
|
scroll_speed = 30.0
|
||||||
metadata/_edit_use_anchors_ = true
|
metadata/_edit_use_anchors_ = true
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="." unique_id=1300382168]
|
[node name="TextureRect" type="TextureRect" parent="." unique_id=1764222864]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
pivot_offset_ratio = Vector2(0.5, 0.5)
|
||||||
|
mouse_filter = 2
|
||||||
|
texture = ExtResource("10_xv7rp")
|
||||||
|
metadata/_edit_use_anchors_ = true
|
||||||
|
|
||||||
|
[node name="DisplayContainer" type="Control" parent="." unique_id=1280352652]
|
||||||
|
clip_contents = true
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 7
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 1.0
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = -85.5
|
||||||
|
offset_top = -84.0
|
||||||
|
offset_right = 83.5
|
||||||
|
offset_bottom = -52.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 0
|
||||||
|
|
||||||
|
[node name="TrackLabel" type="Label" parent="DisplayContainer" unique_id=441671750]
|
||||||
|
unique_name_in_owner = true
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
metadata/_edit_use_anchors_ = true
|
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer" unique_id=1923985665]
|
|
||||||
layout_mode = 2
|
|
||||||
metadata/_edit_use_anchors_ = true
|
|
||||||
|
|
||||||
[node name="TrackLabel" type="Label" parent="HBoxContainer/VBoxContainer" unique_id=1430240022]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 4
|
|
||||||
theme = ExtResource("2_0koyu")
|
theme = ExtResource("2_0koyu")
|
||||||
theme_override_font_sizes/font_size = 24
|
theme_override_font_sizes/font_size = 12
|
||||||
text = "Uknown Track"
|
text = "Uknown Track"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="IconButtonsRow" type="HBoxContainer" parent="HBoxContainer/VBoxContainer" unique_id=1734127019]
|
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=1829043318]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 12
|
||||||
|
anchor_top = 1.0
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_top = -40.0
|
||||||
|
offset_bottom = -8.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_constants/margin_left = 24
|
||||||
|
theme_override_constants/margin_right = 24
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer" unique_id=1300382168]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_constants/separation = 0
|
||||||
alignment = 1
|
alignment = 1
|
||||||
|
|
||||||
[node name="PrevTrackIconButton" parent="HBoxContainer/VBoxContainer/IconButtonsRow" unique_id=1750448019 instance=ExtResource("1_ucnyb")]
|
[node name="PrevTrackButton" type="Button" parent="MarginContainer/HBoxContainer" unique_id=1132927190]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(32, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
image = ExtResource("3_netjv")
|
size_flags_horizontal = 4
|
||||||
|
flat = true
|
||||||
|
|
||||||
[node name="Texture" parent="HBoxContainer/VBoxContainer/IconButtonsRow/PrevTrackIconButton" index="0" unique_id=1071359322]
|
[node name="PlayTrackButton" type="Button" parent="MarginContainer/HBoxContainer" unique_id=445406105]
|
||||||
anchors_preset = -1
|
|
||||||
offset_left = 116.66667
|
|
||||||
offset_top = 131.3789
|
|
||||||
offset_right = -116.666664
|
|
||||||
offset_bottom = -131.3789
|
|
||||||
texture = ExtResource("3_netjv")
|
|
||||||
metadata/_edit_use_anchors_ = true
|
|
||||||
|
|
||||||
[node name="PlayPauseIconButton" parent="HBoxContainer/VBoxContainer/IconButtonsRow" unique_id=1533336956 instance=ExtResource("1_ucnyb")]
|
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(32, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
image = ExtResource("4_urwwp")
|
size_flags_horizontal = 5
|
||||||
images = Array[Texture]([ExtResource("4_urwwp"), ExtResource("5_urwwp")])
|
flat = true
|
||||||
|
|
||||||
[node name="Texture" parent="HBoxContainer/VBoxContainer/IconButtonsRow/PlayPauseIconButton" index="0" unique_id=1071359322]
|
[node name="NextTrackButton" type="Button" parent="MarginContainer/HBoxContainer" unique_id=1836743157]
|
||||||
anchors_preset = -1
|
|
||||||
offset_left = 116.66667
|
|
||||||
offset_top = 131.3789
|
|
||||||
offset_right = -116.666664
|
|
||||||
offset_bottom = -131.3789
|
|
||||||
texture = ExtResource("4_urwwp")
|
|
||||||
metadata/_edit_use_anchors_ = true
|
|
||||||
|
|
||||||
[node name="NextTrackIconButton" parent="HBoxContainer/VBoxContainer/IconButtonsRow" unique_id=2108379455 instance=ExtResource("1_ucnyb")]
|
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(32, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
image = ExtResource("5_0koyu")
|
size_flags_horizontal = 5
|
||||||
|
flat = true
|
||||||
|
|
||||||
[node name="Texture" parent="HBoxContainer/VBoxContainer/IconButtonsRow/NextTrackIconButton" index="0" unique_id=1071359322]
|
[node name="PauseTrackButton" type="Button" parent="MarginContainer/HBoxContainer" unique_id=1151045878]
|
||||||
anchors_preset = -1
|
|
||||||
offset_left = 116.66667
|
|
||||||
offset_top = 131.3789
|
|
||||||
offset_right = -116.666664
|
|
||||||
offset_bottom = -131.3789
|
|
||||||
texture = ExtResource("5_0koyu")
|
|
||||||
metadata/_edit_use_anchors_ = true
|
|
||||||
|
|
||||||
[node name="VBoxContainer2" type="VBoxContainer" parent="HBoxContainer" unique_id=1843266535]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_vertical = 4
|
|
||||||
|
|
||||||
[node name="IncreaseVolumeIconButton" parent="HBoxContainer/VBoxContainer2" unique_id=1788399963 instance=ExtResource("1_ucnyb")]
|
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(40, 40)
|
custom_minimum_size = Vector2(32, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 0
|
size_flags_horizontal = 5
|
||||||
size_flags_vertical = 3
|
flat = true
|
||||||
image = ExtResource("6_xv7rp")
|
|
||||||
|
|
||||||
[node name="Texture" parent="HBoxContainer/VBoxContainer2/IncreaseVolumeIconButton" index="0" unique_id=1071359322]
|
[node name="IncreaseVolumeButton" type="Button" parent="MarginContainer/HBoxContainer" unique_id=809451843]
|
||||||
custom_minimum_size = Vector2(40, 40)
|
|
||||||
offset_left = 106.66667
|
|
||||||
offset_top = 107.01433
|
|
||||||
offset_right = -106.666664
|
|
||||||
offset_bottom = -107.014336
|
|
||||||
texture = ExtResource("6_xv7rp")
|
|
||||||
metadata/_edit_use_anchors_ = true
|
|
||||||
|
|
||||||
[node name="DecreaseVolumeIconButton" parent="HBoxContainer/VBoxContainer2" unique_id=399629327 instance=ExtResource("1_ucnyb")]
|
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(40, 40)
|
custom_minimum_size = Vector2(32, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 0
|
size_flags_horizontal = 5
|
||||||
size_flags_vertical = 3
|
flat = true
|
||||||
image = ExtResource("7_7ib2x")
|
|
||||||
|
|
||||||
[node name="Texture" parent="HBoxContainer/VBoxContainer2/DecreaseVolumeIconButton" index="0" unique_id=1071359322]
|
[node name="DecreaseVolumeButton" type="Button" parent="MarginContainer/HBoxContainer" unique_id=1399480885]
|
||||||
custom_minimum_size = Vector2(40, 40)
|
unique_name_in_owner = true
|
||||||
offset_left = 106.66667
|
custom_minimum_size = Vector2(32, 0)
|
||||||
offset_top = 107.01433
|
layout_mode = 2
|
||||||
offset_right = -106.666664
|
size_flags_horizontal = 5
|
||||||
offset_bottom = -107.014336
|
flat = true
|
||||||
texture = ExtResource("7_7ib2x")
|
|
||||||
metadata/_edit_use_anchors_ = true
|
|
||||||
|
|
||||||
[editable path="HBoxContainer/VBoxContainer/IconButtonsRow/PrevTrackIconButton"]
|
[node name="LeftWheel" type="TextureRect" parent="." unique_id=1719200441]
|
||||||
[editable path="HBoxContainer/VBoxContainer/IconButtonsRow/PlayPauseIconButton"]
|
unique_name_in_owner = true
|
||||||
[editable path="HBoxContainer/VBoxContainer/IconButtonsRow/NextTrackIconButton"]
|
layout_mode = 1
|
||||||
[editable path="HBoxContainer/VBoxContainer2/IncreaseVolumeIconButton"]
|
anchors_preset = 8
|
||||||
[editable path="HBoxContainer/VBoxContainer2/DecreaseVolumeIconButton"]
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -64.5
|
||||||
|
offset_top = -51.5
|
||||||
|
offset_right = -33.5
|
||||||
|
offset_bottom = -20.5
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
pivot_offset_ratio = Vector2(0.5, 0.5)
|
||||||
|
texture = ExtResource("4_n5r1o")
|
||||||
|
stretch_mode = 2
|
||||||
|
|
||||||
|
[node name="RightWheel" type="TextureRect" parent="." unique_id=960520776]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = 35.5
|
||||||
|
offset_top = -51.5
|
||||||
|
offset_right = 66.5
|
||||||
|
offset_bottom = -20.5
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
pivot_offset_ratio = Vector2(0.5, 0.5)
|
||||||
|
texture = ExtResource("4_n5r1o")
|
||||||
|
stretch_mode = 2
|
||||||
|
|||||||
@@ -80,28 +80,23 @@ layout_mode = 2
|
|||||||
|
|
||||||
[node name="IconButton" parent="Rows/TimeOfDayRow" index="0" unique_id=1750448019]
|
[node name="IconButton" parent="Rows/TimeOfDayRow" index="0" unique_id=1750448019]
|
||||||
apply_texture_on_selection = false
|
apply_texture_on_selection = false
|
||||||
enable_tooltip = null
|
|
||||||
|
|
||||||
[node name="IconButton2" parent="Rows/TimeOfDayRow" index="1" unique_id=638856991]
|
[node name="IconButton2" parent="Rows/TimeOfDayRow" index="1" unique_id=638856991]
|
||||||
data = "Sunrise"
|
data = "Sunrise"
|
||||||
image = ExtResource("3_kd244")
|
image = ExtResource("3_kd244")
|
||||||
enable_tooltip = null
|
|
||||||
|
|
||||||
[node name="IconButton3" parent="Rows/TimeOfDayRow" index="2" unique_id=1662483962]
|
[node name="IconButton3" parent="Rows/TimeOfDayRow" index="2" unique_id=1662483962]
|
||||||
data = "Day"
|
data = "Day"
|
||||||
image = ExtResource("4_lapqe")
|
image = ExtResource("4_lapqe")
|
||||||
enable_tooltip = null
|
|
||||||
|
|
||||||
[node name="IconButton4" parent="Rows/TimeOfDayRow" index="3" unique_id=1375190490]
|
[node name="IconButton4" parent="Rows/TimeOfDayRow" index="3" unique_id=1375190490]
|
||||||
data = "Night"
|
data = "Night"
|
||||||
enable_tooltip = null
|
|
||||||
|
|
||||||
[node name="IconButton5" parent="Rows/TimeOfDayRow" index="4" unique_id=315412403]
|
[node name="IconButton5" parent="Rows/TimeOfDayRow" index="4" unique_id=315412403]
|
||||||
data = "Cycle"
|
data = "Cycle"
|
||||||
image = ExtResource("5_fjfwt")
|
image = ExtResource("5_fjfwt")
|
||||||
images = Array[Texture]([ExtResource("5_fjfwt"), ExtResource("6_luj56")])
|
images = Array[Texture]([ExtResource("5_fjfwt"), ExtResource("6_luj56")])
|
||||||
apply_texture_on_selection = false
|
apply_texture_on_selection = false
|
||||||
enable_tooltip = null
|
|
||||||
|
|
||||||
[node name="ShowContainerTween" parent="Rows/TimeOfDayRow" index="5" unique_id=160227524]
|
[node name="ShowContainerTween" parent="Rows/TimeOfDayRow" index="5" unique_id=160227524]
|
||||||
tween_types = Array[String](["impact_land", "fade_in"])
|
tween_types = Array[String](["impact_land", "fade_in"])
|
||||||
@@ -116,35 +111,30 @@ layout_mode = 2
|
|||||||
[node name="IconButton" parent="Rows/WeatherRow" index="0" unique_id=1750448019]
|
[node name="IconButton" parent="Rows/WeatherRow" index="0" unique_id=1750448019]
|
||||||
image = ExtResource("6_yggu7")
|
image = ExtResource("6_yggu7")
|
||||||
apply_texture_on_selection = false
|
apply_texture_on_selection = false
|
||||||
enable_tooltip = null
|
|
||||||
|
|
||||||
[node name="IconButton2" parent="Rows/WeatherRow" index="1" unique_id=638856991]
|
[node name="IconButton2" parent="Rows/WeatherRow" index="1" unique_id=638856991]
|
||||||
data = "Snow"
|
data = "Snow"
|
||||||
image = ExtResource("6_xykej")
|
image = ExtResource("6_xykej")
|
||||||
images = Array[Texture]([ExtResource("6_xykej"), ExtResource("6_167gj")])
|
images = Array[Texture]([ExtResource("6_xykej"), ExtResource("6_167gj")])
|
||||||
apply_texture_on_selection = false
|
apply_texture_on_selection = false
|
||||||
enable_tooltip = null
|
|
||||||
|
|
||||||
[node name="IconButton3" parent="Rows/WeatherRow" index="2" unique_id=1662483962]
|
[node name="IconButton3" parent="Rows/WeatherRow" index="2" unique_id=1662483962]
|
||||||
data = "Rain"
|
data = "Rain"
|
||||||
image = ExtResource("7_jpmw5")
|
image = ExtResource("7_jpmw5")
|
||||||
images = Array[Texture]([ExtResource("7_jpmw5"), ExtResource("8_c5e3i")])
|
images = Array[Texture]([ExtResource("7_jpmw5"), ExtResource("8_c5e3i")])
|
||||||
apply_texture_on_selection = false
|
apply_texture_on_selection = false
|
||||||
enable_tooltip = null
|
|
||||||
|
|
||||||
[node name="IconButton4" parent="Rows/WeatherRow" index="3" unique_id=1375190490]
|
[node name="IconButton4" parent="Rows/WeatherRow" index="3" unique_id=1375190490]
|
||||||
data = "Storm"
|
data = "Storm"
|
||||||
image = ExtResource("8_i1mwp")
|
image = ExtResource("8_i1mwp")
|
||||||
images = Array[Texture]([ExtResource("8_i1mwp"), ExtResource("10_th1nj")])
|
images = Array[Texture]([ExtResource("8_i1mwp"), ExtResource("10_th1nj")])
|
||||||
apply_texture_on_selection = false
|
apply_texture_on_selection = false
|
||||||
enable_tooltip = null
|
|
||||||
|
|
||||||
[node name="IconButton5" parent="Rows/WeatherRow" index="4" unique_id=315412403]
|
[node name="IconButton5" parent="Rows/WeatherRow" index="4" unique_id=315412403]
|
||||||
data = "Wind"
|
data = "Wind"
|
||||||
image = ExtResource("11_gcgq4")
|
image = ExtResource("11_gcgq4")
|
||||||
images = Array[Texture]([ExtResource("11_gcgq4"), ExtResource("12_fjfwt")])
|
images = Array[Texture]([ExtResource("11_gcgq4"), ExtResource("12_fjfwt")])
|
||||||
apply_texture_on_selection = false
|
apply_texture_on_selection = false
|
||||||
enable_tooltip = null
|
|
||||||
|
|
||||||
[node name="ShowContainerTween" parent="Rows/WeatherRow" index="5" unique_id=160227524 node_paths=PackedStringArray("targets")]
|
[node name="ShowContainerTween" parent="Rows/WeatherRow" index="5" unique_id=160227524 node_paths=PackedStringArray("targets")]
|
||||||
targets = [NodePath("../IconButton2"), NodePath("../IconButton3"), NodePath("../IconButton4"), NodePath("../IconButton5"), NodePath("../IconButton6")]
|
targets = [NodePath("../IconButton2"), NodePath("../IconButton3"), NodePath("../IconButton4"), NodePath("../IconButton5"), NodePath("../IconButton6")]
|
||||||
@@ -163,7 +153,6 @@ size_flags_vertical = 3
|
|||||||
data = "Random"
|
data = "Random"
|
||||||
image = ExtResource("14_gcgq4")
|
image = ExtResource("14_gcgq4")
|
||||||
apply_texture_on_selection = false
|
apply_texture_on_selection = false
|
||||||
enable_tooltip = null
|
|
||||||
|
|
||||||
[node name="TopButtons" type="VBoxContainer" parent="." unique_id=1644086668]
|
[node name="TopButtons" type="VBoxContainer" parent="." unique_id=1644086668]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
@@ -212,13 +201,11 @@ theme_override_constants/separation = 8
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
image = ExtResource("19_vywaj")
|
image = ExtResource("19_vywaj")
|
||||||
enable_tooltip = null
|
|
||||||
|
|
||||||
[node name="CollectibleIconButton" parent="MiddleButtons" unique_id=520235552 instance=ExtResource("3_t1xop")]
|
[node name="CollectibleIconButton" parent="MiddleButtons" unique_id=520235552 instance=ExtResource("3_t1xop")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
image = ExtResource("19_yggu7")
|
image = ExtResource("19_yggu7")
|
||||||
enable_tooltip = null
|
|
||||||
|
|
||||||
[node name="PhotoIconButton" parent="MiddleButtons" unique_id=1863476241 instance=ExtResource("3_t1xop")]
|
[node name="PhotoIconButton" parent="MiddleButtons" unique_id=1863476241 instance=ExtResource("3_t1xop")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
@@ -252,7 +239,6 @@ size_flags_vertical = 1
|
|||||||
[node name="IconButton" parent="InfoLabels/CamerasRow" index="0" unique_id=1750448019]
|
[node name="IconButton" parent="InfoLabels/CamerasRow" index="0" unique_id=1750448019]
|
||||||
image = ExtResource("28_mukbp")
|
image = ExtResource("28_mukbp")
|
||||||
apply_texture_on_selection = false
|
apply_texture_on_selection = false
|
||||||
enable_tooltip = null
|
|
||||||
|
|
||||||
[node name="IconButton2" parent="InfoLabels/CamerasRow" index="1" unique_id=638856991]
|
[node name="IconButton2" parent="InfoLabels/CamerasRow" index="1" unique_id=638856991]
|
||||||
data = "1"
|
data = "1"
|
||||||
@@ -278,6 +264,14 @@ image = ExtResource("32_nqdet")
|
|||||||
enable_tooltip = true
|
enable_tooltip = true
|
||||||
tooltip_image = ExtResource("36_yts6a")
|
tooltip_image = ExtResource("36_yts6a")
|
||||||
|
|
||||||
|
[node name="ShowContainerTween" parent="InfoLabels/CamerasRow" index="5" unique_id=160227524 node_paths=PackedStringArray("targets")]
|
||||||
|
targets = [NodePath("../IconButton2"), NodePath("../IconButton3"), NodePath("../IconButton4"), NodePath("../IconButton5"), NodePath("../IconButton6")]
|
||||||
|
tween_types = Array[String](["impact_land", "fade_in"])
|
||||||
|
|
||||||
|
[node name="HideContainerTween" parent="InfoLabels/CamerasRow" index="6" unique_id=1169748375 node_paths=PackedStringArray("targets")]
|
||||||
|
targets = [NodePath("../IconButton6"), NodePath("../IconButton5"), NodePath("../IconButton4"), NodePath("../IconButton3"), NodePath("../IconButton2")]
|
||||||
|
tween_types = Array[String](["impact_land", "fade_out"])
|
||||||
|
|
||||||
[node name="IconButton6" parent="InfoLabels/CamerasRow" unique_id=1017773972 instance=ExtResource("3_t1xop")]
|
[node name="IconButton6" parent="InfoLabels/CamerasRow" unique_id=1017773972 instance=ExtResource("3_t1xop")]
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -288,14 +282,6 @@ image = ExtResource("33_l4tct")
|
|||||||
enable_tooltip = true
|
enable_tooltip = true
|
||||||
tooltip_image = ExtResource("38_vv0oj")
|
tooltip_image = ExtResource("38_vv0oj")
|
||||||
|
|
||||||
[node name="ShowContainerTween" parent="InfoLabels/CamerasRow" index="6" unique_id=160227524 node_paths=PackedStringArray("targets")]
|
|
||||||
targets = [NodePath("../IconButton2"), NodePath("../IconButton3"), NodePath("../IconButton4"), NodePath("../IconButton5"), NodePath("../IconButton6")]
|
|
||||||
tween_types = Array[String](["impact_land", "fade_in"])
|
|
||||||
|
|
||||||
[node name="HideContainerTween" parent="InfoLabels/CamerasRow" index="7" unique_id=1169748375 node_paths=PackedStringArray("targets")]
|
|
||||||
targets = [NodePath("../IconButton6"), NodePath("../IconButton5"), NodePath("../IconButton4"), NodePath("../IconButton3"), NodePath("../IconButton2")]
|
|
||||||
tween_types = Array[String](["impact_land", "fade_out"])
|
|
||||||
|
|
||||||
[node name="TimeLabel" type="Label" parent="InfoLabels" unique_id=18932607]
|
[node name="TimeLabel" type="Label" parent="InfoLabels" unique_id=18932607]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -320,14 +306,15 @@ offset_bottom = -20.0
|
|||||||
[node name="AudioPlayer" parent="." unique_id=425192018 node_paths=PackedStringArray("radio") instance=ExtResource("7_lapqe")]
|
[node name="AudioPlayer" parent="." unique_id=425192018 node_paths=PackedStringArray("radio") instance=ExtResource("7_lapqe")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
|
anchors_preset = 3
|
||||||
anchor_left = 1.0
|
anchor_left = 1.0
|
||||||
anchor_top = 0.99814814
|
anchor_top = 1.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 0.99814814
|
anchor_bottom = 1.0
|
||||||
offset_left = -166.0
|
offset_left = -261.0
|
||||||
offset_top = -74.0
|
offset_top = -199.0
|
||||||
offset_right = -166.0
|
offset_right = -20.0
|
||||||
offset_bottom = -74.0
|
offset_bottom = -20.0
|
||||||
grow_horizontal = 0
|
grow_horizontal = 0
|
||||||
grow_vertical = 0
|
grow_vertical = 0
|
||||||
radio = NodePath("../Radio")
|
radio = NodePath("../Radio")
|
||||||
|
|||||||
@@ -35,6 +35,12 @@ func prev_track():
|
|||||||
func toggle_pause():
|
func toggle_pause():
|
||||||
stream_paused = !stream_paused
|
stream_paused = !stream_paused
|
||||||
|
|
||||||
|
func pause():
|
||||||
|
stream_paused = true
|
||||||
|
|
||||||
|
func unpause():
|
||||||
|
stream_paused = false
|
||||||
|
|
||||||
func stop_radio():
|
func stop_radio():
|
||||||
stop()
|
stop()
|
||||||
stream_paused = false
|
stream_paused = false
|
||||||
|
|||||||
Reference in New Issue
Block a user