mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-12-25 01:17:10 +01:00
18 lines
560 B
GDScript3
18 lines
560 B
GDScript3
|
extends CheckBox
|
||
|
|
||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||
|
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||
|
|
||
|
export(String) var property_category : String
|
||
|
export(String) var property_name : String
|
||
|
|
||
|
func _ready() -> void:
|
||
|
var p : bool = Settings.get_value(property_category, property_name) as bool
|
||
|
|
||
|
if p != pressed:
|
||
|
pressed = p
|
||
|
|
||
|
func _toggled(button_pressed : bool) -> void:
|
||
|
Settings.set_value(property_category, property_name, button_pressed)
|