bunch of new options, removed other project data
This commit is contained in:
parent
733a8fd6c0
commit
bfee9448f5
11 changed files with 96 additions and 225 deletions
|
|
@ -8,6 +8,15 @@ signal options_changed
|
|||
@export var duration_m: SpinBox
|
||||
@export var size_label: Label
|
||||
@export var size_slider: HSlider
|
||||
@export var bar_color: ColorPickerButton
|
||||
@export var background_color: ColorPickerButton
|
||||
@export var warning_color: ColorPickerButton
|
||||
@export var trans_label: Label
|
||||
@export var trans_slider: HSlider
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
hide()
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
|
|
@ -19,6 +28,7 @@ func _process(delta: float) -> void:
|
|||
#validate inputs?, disable save button if somehow invalid?
|
||||
if visible:
|
||||
size_label.text = str(Data.save.size)+"px"
|
||||
trans_label.text = str(roundi(Data.save.bar_transparency*100))+"%"
|
||||
pass
|
||||
|
||||
|
||||
|
|
@ -31,6 +41,7 @@ func _on_close_requested() -> void:
|
|||
|
||||
func _on_cancel_button_pressed() -> void:
|
||||
Data.load_data()
|
||||
options_changed.emit()
|
||||
hide()
|
||||
|
||||
|
||||
|
|
@ -51,6 +62,10 @@ func _on_visibility_changed() -> void:
|
|||
duration_h.value = int(Data.save.duration/(60*60))
|
||||
duration_m.value = int((Data.save.duration-duration_h.value*60*60)/60)
|
||||
size_slider.value = Data.save.size
|
||||
bar_color.color = Data.save.bar_color
|
||||
background_color.color = Data.save.background_color
|
||||
warning_color.color = Data.save.warning_color
|
||||
trans_slider.value = Data.save.bar_transparency
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
|
|
@ -81,3 +96,23 @@ func _on_position_dropdown_item_selected(index: int) -> void:
|
|||
elif index == 1:
|
||||
Data.save.position = Data.Position.Right
|
||||
options_changed.emit()
|
||||
|
||||
|
||||
func _on_bar_color_color_changed(color: Color) -> void:
|
||||
Data.save.bar_color = color
|
||||
options_changed.emit()
|
||||
|
||||
|
||||
func _on_background_color_color_changed(color: Color) -> void:
|
||||
Data.save.background_color = color
|
||||
options_changed.emit()
|
||||
|
||||
|
||||
func _on_warning_color_color_changed(color: Color) -> void:
|
||||
Data.save.warning_color = color
|
||||
options_changed.emit()
|
||||
|
||||
|
||||
func _on_trans_slider_value_changed(value: float) -> void:
|
||||
Data.save.bar_transparency = value
|
||||
options_changed.emit()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue