feat: add battlepass slider and quest list tabs to lobby HUD
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
extends Panel
|
||||
|
||||
signal period_changed(period: String)
|
||||
|
||||
@onready var _daily_btn: Button = %DailyTabBtn
|
||||
@onready var _weekly_btn: Button = %WeeklyTabBtn
|
||||
@onready var _monthly_btn: Button = %MonthlyTabBtn
|
||||
|
||||
var _active := "daily"
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
_daily_btn.pressed.connect(_select.bind("daily"))
|
||||
_weekly_btn.pressed.connect(_select.bind("weekly"))
|
||||
_monthly_btn.pressed.connect(_select.bind("monthly"))
|
||||
|
||||
|
||||
func _select(period: String) -> void:
|
||||
if period == _active:
|
||||
return
|
||||
_active = period
|
||||
_daily_btn.button_pressed = (period == "daily")
|
||||
_weekly_btn.button_pressed = (period == "weekly")
|
||||
_monthly_btn.button_pressed = (period == "monthly")
|
||||
period_changed.emit(period)
|
||||
Reference in New Issue
Block a user