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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue