improved the streamer window
This commit is contained in:
@@ -1319,8 +1319,8 @@ label_settings = SubResource("LabelSettings_f1d3e")
|
|||||||
|
|
||||||
[node name="PlayingNow" type="Window" parent="."]
|
[node name="PlayingNow" type="Window" parent="."]
|
||||||
transparent_bg = true
|
transparent_bg = true
|
||||||
initial_position = 4
|
initial_position = 2
|
||||||
size = Vector2i(400, 200)
|
size = Vector2i(300, 300)
|
||||||
visible = false
|
visible = false
|
||||||
unresizable = true
|
unresizable = true
|
||||||
borderless = true
|
borderless = true
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ extends Control
|
|||||||
@export var SongAuthorLabel: RichTextLabel
|
@export var SongAuthorLabel: RichTextLabel
|
||||||
@onready var ParentWindow:Window = $".."
|
@onready var ParentWindow:Window = $".."
|
||||||
@export var update_tick:float = 0.1
|
@export var update_tick:float = 0.1
|
||||||
|
@export var slider:HSlider
|
||||||
var ticktime:float
|
var ticktime:float
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
@@ -24,6 +25,7 @@ func scroll(scroller:ScrollContainer,incriment:float):
|
|||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
ticktime -= delta
|
ticktime -= delta
|
||||||
ParentWindow.size = size
|
ParentWindow.size = size
|
||||||
|
slider.value = ParentScene.current_progress.value
|
||||||
if ticktime <= 0:
|
if ticktime <= 0:
|
||||||
ticktime = update_tick
|
ticktime = update_tick
|
||||||
if scroll(SongNameScroller,1):
|
if scroll(SongNameScroller,1):
|
||||||
@@ -36,4 +38,6 @@ func SongChanged():
|
|||||||
SongNameLabel.text = ParentScene.currentSongName
|
SongNameLabel.text = ParentScene.currentSongName
|
||||||
if ParentScene.currentArtistName:
|
if ParentScene.currentArtistName:
|
||||||
SongAuthorLabel.text = ParentScene.currentArtistName
|
SongAuthorLabel.text = ParentScene.currentArtistName
|
||||||
|
else:
|
||||||
|
SongAuthorLabel.text = ""
|
||||||
#ParentWindow.size = size * 2
|
#ParentWindow.size = size * 2
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ void vertex() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void fragment() {
|
void fragment() {
|
||||||
|
|
||||||
COLOR.a = texture(alpha,UV).a;
|
COLOR.a = texture(alpha,UV).a;
|
||||||
//COLOR.a = 1.0-((cos((UV.x)*PI*2.0)+1.0)/2.0);
|
//COLOR.a = 1.0-((cos((UV.x)*PI*2.0)+1.0)/2.0);
|
||||||
//COLOR.a -= ((cos(UV.y*PI*2.0)+1.0)/2.0);
|
//COLOR.a -= ((cos(UV.y*PI*2.0)+1.0)/2.0);
|
||||||
|
|||||||
+85
-54
@@ -1,35 +1,54 @@
|
|||||||
[gd_scene load_steps=8 format=3 uid="uid://n7cnapaftfse"]
|
[gd_scene load_steps=11 format=3 uid="uid://n7cnapaftfse"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://q2gdlr10ncnb" path="res://playing_now_window.gd" id="1_f0rac"]
|
[ext_resource type="Script" uid="uid://q2gdlr10ncnb" path="res://playing_now_window.gd" id="1_f0rac"]
|
||||||
[ext_resource type="Shader" uid="uid://byan4wmg2pjl6" path="res://playing_now_window.gdshader" id="2_yr2ao"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://cq8jj63iyu2cs" path="res://d7hftxdivxxvm.cloudfront.webp" id="3_haeb5"]
|
[ext_resource type="Texture2D" uid="uid://cq8jj63iyu2cs" path="res://d7hftxdivxxvm.cloudfront.webp" id="3_haeb5"]
|
||||||
|
|
||||||
[sub_resource type="Gradient" id="Gradient_haeb5"]
|
[sub_resource type="Gradient" id="Gradient_yr2ao"]
|
||||||
offsets = PackedFloat32Array(0.670732, 1)
|
offsets = PackedFloat32Array(0.992806, 1)
|
||||||
colors = PackedColorArray(0, 0, 0, 1, 1, 1, 1, 0)
|
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
|
||||||
|
|
||||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_nf0dg"]
|
[sub_resource type="GradientTexture2D" id="GradientTexture2D_haeb5"]
|
||||||
gradient = SubResource("Gradient_haeb5")
|
gradient = SubResource("Gradient_yr2ao")
|
||||||
fill = 1
|
width = 512
|
||||||
|
height = 512
|
||||||
|
fill = 2
|
||||||
fill_from = Vector2(0.5, 0.5)
|
fill_from = Vector2(0.5, 0.5)
|
||||||
fill_to = Vector2(0.5, 0)
|
fill_to = Vector2(0.5, 0)
|
||||||
metadata/_snap_enabled = true
|
metadata/_snap_enabled = true
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_haeb5"]
|
[sub_resource type="Gradient" id="Gradient_nf0dg"]
|
||||||
shader = ExtResource("2_yr2ao")
|
offsets = PackedFloat32Array(0.410072, 1)
|
||||||
shader_parameter/alpha = SubResource("GradientTexture2D_nf0dg")
|
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1)
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ew3gl"]
|
[sub_resource type="GradientTexture2D" id="GradientTexture2D_kcqx3"]
|
||||||
bg_color = Color(0.6, 0.6, 0.6, 0)
|
gradient = SubResource("Gradient_nf0dg")
|
||||||
corner_radius_top_left = 20
|
|
||||||
corner_radius_top_right = 20
|
|
||||||
corner_radius_bottom_right = 20
|
|
||||||
corner_radius_bottom_left = 20
|
|
||||||
corner_detail = 10
|
|
||||||
shadow_color = Color(0, 0, 0, 0.435294)
|
|
||||||
shadow_size = 45
|
|
||||||
|
|
||||||
[node name="PlayingNowWindow" type="Control" node_paths=PackedStringArray("SongImage", "SongNameLabel", "SongNameScroller", "SongAuthorScroller", "SongAuthorLabel")]
|
[sub_resource type="Theme" id="Theme_yr2ao"]
|
||||||
|
RichTextLabel/colors/font_shadow_color = Color(0.0768358, 0.0768358, 0.0768358, 0.52549)
|
||||||
|
RichTextLabel/constants/shadow_outline_size = 10
|
||||||
|
|
||||||
|
[sub_resource type="ImageTexture" id="ImageTexture_yr2ao"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_haeb5"]
|
||||||
|
bg_color = Color(0.28485, 0.28485, 0.28485, 1)
|
||||||
|
corner_radius_top_left = 4
|
||||||
|
corner_radius_top_right = 4
|
||||||
|
corner_radius_bottom_right = 4
|
||||||
|
corner_radius_bottom_left = 4
|
||||||
|
expand_margin_top = 5.0
|
||||||
|
expand_margin_bottom = 5.0
|
||||||
|
shadow_color = Color(0, 0, 0, 0.443137)
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yr2ao"]
|
||||||
|
bg_color = Color(1, 1, 1, 1)
|
||||||
|
corner_radius_top_left = 4
|
||||||
|
corner_radius_top_right = 4
|
||||||
|
corner_radius_bottom_right = 4
|
||||||
|
corner_radius_bottom_left = 4
|
||||||
|
expand_margin_top = 5.0
|
||||||
|
expand_margin_bottom = 5.0
|
||||||
|
|
||||||
|
[node name="PlayingNowWindow" type="Control" node_paths=PackedStringArray("SongImage", "SongNameLabel", "SongNameScroller", "SongAuthorScroller", "SongAuthorLabel", "slider")]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
@@ -39,15 +58,27 @@ grow_vertical = 2
|
|||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
script = ExtResource("1_f0rac")
|
script = ExtResource("1_f0rac")
|
||||||
SongImage = NodePath("TextureRect")
|
SongImage = NodePath("ColorRect/TextureRect")
|
||||||
SongNameLabel = NodePath("Panel/VBoxContainer/ScrollContainer/SongName")
|
SongNameLabel = NodePath("VBoxContainer/ScrollContainer/SongName")
|
||||||
SongNameScroller = NodePath("Panel/VBoxContainer/ScrollContainer")
|
SongNameScroller = NodePath("VBoxContainer/ScrollContainer")
|
||||||
SongAuthorScroller = NodePath("Panel/VBoxContainer/ScrollContainer2")
|
SongAuthorScroller = NodePath("VBoxContainer/ScrollContainer2")
|
||||||
SongAuthorLabel = NodePath("Panel/VBoxContainer/ScrollContainer2/SongAuthor")
|
SongAuthorLabel = NodePath("VBoxContainer/ScrollContainer2/SongAuthor")
|
||||||
|
slider = NodePath("VBoxContainer/Slider")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="."]
|
[node name="ColorRect" type="TextureRect" parent="."]
|
||||||
|
clip_children = 1
|
||||||
z_index = -1
|
z_index = -1
|
||||||
material = SubResource("ShaderMaterial_haeb5")
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
texture = SubResource("GradientTexture2D_haeb5")
|
||||||
|
expand_mode = 3
|
||||||
|
stretch_mode = 5
|
||||||
|
|
||||||
|
[node name="TextureRect" type="TextureRect" parent="ColorRect"]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
@@ -57,46 +88,32 @@ grow_vertical = 2
|
|||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
texture = ExtResource("3_haeb5")
|
texture = ExtResource("3_haeb5")
|
||||||
expand_mode = 3
|
expand_mode = 3
|
||||||
stretch_mode = 5
|
stretch_mode = 6
|
||||||
|
|
||||||
[node name="Panel" type="Panel" parent="."]
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||||
z_index = -1
|
clip_children = 1
|
||||||
custom_minimum_size = Vector2(206.815, 60.71)
|
position = Vector2(-95.3115, -216)
|
||||||
layout_mode = 1
|
texture = SubResource("GradientTexture2D_kcqx3")
|
||||||
anchors_preset = 8
|
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_top = 0.5
|
|
||||||
anchor_right = 0.5
|
|
||||||
anchor_bottom = 0.5
|
|
||||||
offset_left = -103.408
|
|
||||||
offset_top = -30.355
|
|
||||||
offset_right = 103.407
|
|
||||||
offset_bottom = 30.355
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
theme_override_styles/panel = SubResource("StyleBoxFlat_ew3gl")
|
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="Panel"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||||
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
|
||||||
offset_top = -1.645
|
|
||||||
offset_right = 6.10352e-05
|
|
||||||
offset_bottom = 1.64503
|
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
|
theme = SubResource("Theme_yr2ao")
|
||||||
alignment = 1
|
alignment = 1
|
||||||
|
|
||||||
[node name="ScrollContainer" type="ScrollContainer" parent="Panel/VBoxContainer"]
|
[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer"]
|
||||||
custom_minimum_size = Vector2(200, 25)
|
custom_minimum_size = Vector2(200, 25)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
size_flags_horizontal = 4
|
||||||
horizontal_scroll_mode = 3
|
horizontal_scroll_mode = 3
|
||||||
vertical_scroll_mode = 0
|
vertical_scroll_mode = 0
|
||||||
|
|
||||||
[node name="SongName" type="RichTextLabel" parent="Panel/VBoxContainer/ScrollContainer"]
|
[node name="SongName" type="RichTextLabel" parent="VBoxContainer/ScrollContainer"]
|
||||||
custom_minimum_size = Vector2(200, 30)
|
custom_minimum_size = Vector2(200, 30)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 6
|
size_flags_horizontal = 6
|
||||||
@@ -105,20 +122,34 @@ text = "Playing now TOOOOOOOOOOTT"
|
|||||||
fit_content = true
|
fit_content = true
|
||||||
scroll_active = false
|
scroll_active = false
|
||||||
autowrap_mode = 0
|
autowrap_mode = 0
|
||||||
visible_characters_behavior = 3
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="ScrollContainer2" type="ScrollContainer" parent="Panel/VBoxContainer"]
|
[node name="ScrollContainer2" type="ScrollContainer" parent="VBoxContainer"]
|
||||||
custom_minimum_size = Vector2(200, 25)
|
custom_minimum_size = Vector2(200, 25)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
size_flags_horizontal = 4
|
||||||
horizontal_scroll_mode = 3
|
horizontal_scroll_mode = 3
|
||||||
vertical_scroll_mode = 0
|
vertical_scroll_mode = 0
|
||||||
|
|
||||||
[node name="SongAuthor" type="RichTextLabel" parent="Panel/VBoxContainer/ScrollContainer2"]
|
[node name="SongAuthor" type="RichTextLabel" parent="VBoxContainer/ScrollContainer2"]
|
||||||
custom_minimum_size = Vector2(200, 30)
|
custom_minimum_size = Vector2(200, 30)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
size_flags_horizontal = 4
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
text = "from protein ribosome"
|
text = "from protein ribosome"
|
||||||
autowrap_mode = 0
|
autowrap_mode = 0
|
||||||
|
horizontal_alignment = 1
|
||||||
visible_characters_behavior = 3
|
visible_characters_behavior = 3
|
||||||
|
|
||||||
|
[node name="Slider" type="HSlider" parent="VBoxContainer"]
|
||||||
|
custom_minimum_size = Vector2(120, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
size_flags_vertical = 4
|
||||||
|
theme_override_icons/grabber_disabled = SubResource("ImageTexture_yr2ao")
|
||||||
|
theme_override_styles/slider = SubResource("StyleBoxFlat_haeb5")
|
||||||
|
theme_override_styles/grabber_area = SubResource("StyleBoxFlat_yr2ao")
|
||||||
|
max_value = 1000.0
|
||||||
|
value = 500.0
|
||||||
|
editable = false
|
||||||
|
scrollable = false
|
||||||
|
|||||||
Reference in New Issue
Block a user