Updated FloatingMenu
Added icons and fixed some mouse interaction
This commit is contained in:
parent
56a7b2cad4
commit
e8e436263d
2 changed files with 28 additions and 1 deletions
|
|
@ -4,11 +4,21 @@ class_name GDFloatingMenu
|
|||
const COL_ON := Color.LIGHT_GREEN
|
||||
const COL_OFF := Color.LIGHT_SALMON
|
||||
|
||||
# Indicators
|
||||
@onready var indicators: Control = %indicators
|
||||
@onready var ind_stream: TextureRect = %ind_stream
|
||||
@onready var ind_mic: TextureRect = %ind_mic
|
||||
@onready var ind_pixelate: TextureRect = %ind_pixelate
|
||||
@onready var ind_browser: TextureRect = %ind_browser
|
||||
# Buttons
|
||||
@onready var btn_obs: GDSubMenuButton = %btn_obs
|
||||
@onready var btn_run_obs: GDSubMenuButton = %btn_run_obs
|
||||
@onready var btn_step_away: GDSubMenuButton = %btn_step_away
|
||||
@onready var btn_tuber: GDSubMenuButton = %btn_tuber
|
||||
@onready var btn_chat: GDSubMenuButton = %btn_chat
|
||||
@onready var btn_user_list: GDSubMenuButton = %btn_user_list
|
||||
@onready var btn_settings: GDSubMenuButton = %btn_settings
|
||||
@onready var btn_end: GDSubMenuButton = %btn_end
|
||||
|
||||
var is_anchored := true
|
||||
var anchored_position: Vector2
|
||||
|
|
@ -20,6 +30,7 @@ func start(_main_menu_button: GDSubMenuButton = null) -> void:
|
|||
generate_panels_buttons()
|
||||
super(self)
|
||||
start_indicators()
|
||||
_connect_signals()
|
||||
|
||||
func start_indicators() -> void:
|
||||
# TODO: Setup NO-OBS-WS Stuff
|
||||
|
|
@ -82,5 +93,7 @@ func calculate_anchored_pos() -> void:
|
|||
anchored_position = anchored_position.clamp(Vector2(), Vector2(w_size)-size)
|
||||
|
||||
#region Hnadle Button Functions
|
||||
|
||||
func _connect_signals() -> void:
|
||||
btn_end.pressed.connect(func(): get_tree().quit())
|
||||
pass
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@
|
|||
[ext_resource type="Texture2D" uid="uid://d2i8l1wlbp3on" path="res://UI/assets/font_awesome/person-running.svg" id="10_liuj8"]
|
||||
[ext_resource type="Texture2D" uid="uid://c4k4skgijfubi" path="res://UI/assets/font_awesome/stopwatch.svg" id="11_ohje3"]
|
||||
[ext_resource type="Texture2D" uid="uid://bw4n42uub1rlj" path="res://UI/assets/bootstrap/person-bounding-box.png" id="12_05x4r"]
|
||||
[ext_resource type="Texture2D" uid="uid://2fmj2y31d8gh" path="res://UI/assets/bootstrap/chat-fill.svg" id="13_2lv5e"]
|
||||
[ext_resource type="Texture2D" uid="uid://byn16ueoaws0c" path="res://UI/assets/font_awesome/users-rectangle.svg" id="14_64x86"]
|
||||
[ext_resource type="Texture2D" uid="uid://cjkwqaf31p1w0" path="res://UI/assets/font_awesome/gear.svg" id="15_ud5hd"]
|
||||
[ext_resource type="Texture2D" uid="uid://d4httqv81w0nn" path="res://UI/assets/font_awesome/circle-xmark.svg" id="16_i4a5v"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_o0p5c"]
|
||||
bg_color = Color(0.08627451, 0.078431375, 0.078431375, 0.5058824)
|
||||
|
|
@ -83,6 +87,7 @@ unique_name_in_owner = true
|
|||
anchors_preset = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="ind_stream" type="TextureRect" parent="indicators" unique_id=1864576166]
|
||||
unique_name_in_owner = true
|
||||
|
|
@ -91,6 +96,7 @@ layout_mode = 0
|
|||
offset_top = 48.0
|
||||
offset_right = 16.0
|
||||
offset_bottom = 64.0
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("4_o0p5c")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
|
@ -103,6 +109,7 @@ offset_left = 16.0
|
|||
offset_top = 48.0
|
||||
offset_right = 32.0
|
||||
offset_bottom = 64.0
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("5_ttodq")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
|
@ -115,6 +122,7 @@ offset_left = 32.0
|
|||
offset_top = 48.0
|
||||
offset_right = 48.0
|
||||
offset_bottom = 64.0
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("6_6cwdq")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
|
@ -127,6 +135,7 @@ offset_left = 48.0
|
|||
offset_top = 48.0
|
||||
offset_right = 64.0
|
||||
offset_bottom = 64.0
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("7_o0p5c")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
|
@ -139,6 +148,7 @@ offset_right = 40.0
|
|||
offset_bottom = 40.0
|
||||
icon = ExtResource("8_k8nf3")
|
||||
script = ExtResource("8_ttodq")
|
||||
expand_on_hover = false
|
||||
fold_on_child_button_pressed = false
|
||||
metadata/_custom_type_script = "uid://8715vyt7prmd"
|
||||
|
||||
|
|
@ -175,6 +185,7 @@ visible = false
|
|||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
icon = ExtResource("13_2lv5e")
|
||||
script = ExtResource("8_ttodq")
|
||||
fold_on_child_button_pressed = false
|
||||
metadata/_custom_type_script = "uid://8715vyt7prmd"
|
||||
|
|
@ -185,6 +196,7 @@ visible = false
|
|||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
icon = ExtResource("14_64x86")
|
||||
script = ExtResource("8_ttodq")
|
||||
fold_on_child_button_pressed = false
|
||||
metadata/_custom_type_script = "uid://8715vyt7prmd"
|
||||
|
|
@ -195,6 +207,7 @@ visible = false
|
|||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
icon = ExtResource("15_ud5hd")
|
||||
script = ExtResource("8_ttodq")
|
||||
fold_on_child_button_pressed = false
|
||||
metadata/_custom_type_script = "uid://8715vyt7prmd"
|
||||
|
|
@ -205,6 +218,7 @@ visible = false
|
|||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
icon = ExtResource("16_i4a5v")
|
||||
script = ExtResource("8_ttodq")
|
||||
fold_on_child_button_pressed = false
|
||||
metadata/_custom_type_script = "uid://8715vyt7prmd"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue