bubble the time_changed signal
| -rw-r--r-- | addons/@bendn/timecontrol/package.json | 4 | ||||
| -rw-r--r-- | addons/@bendn/timecontrol/timebox.gd | 1 | ||||
| -rw-r--r-- | addons/@bendn/timecontrol/timebutton.gd | 7 |
3 files changed, 5 insertions, 7 deletions
diff --git a/addons/@bendn/timecontrol/package.json b/addons/@bendn/timecontrol/package.json index 019b9cb..2df6129 100644 --- a/addons/@bendn/timecontrol/package.json +++ b/addons/@bendn/timecontrol/package.json @@ -1,6 +1,6 @@ { "name": "@bendn/timecontrol", - "version": "1.0.1", + "version": "1.1.0", "description": "adds a control node for selecting times", "main": "timebox.gd", "repository": { @@ -20,4 +20,4 @@ "url": "https://github.com/bend-n/timecontrol/issues" }, "homepage": "https://github.com/bend-n/timecontrol#readme" -}
\ No newline at end of file +} diff --git a/addons/@bendn/timecontrol/timebox.gd b/addons/@bendn/timecontrol/timebox.gd index c2db907..710377f 100644 --- a/addons/@bendn/timecontrol/timebox.gd +++ b/addons/@bendn/timecontrol/timebox.gd @@ -9,7 +9,6 @@ var time := { func _changed(): time_changed.emit() - signal time_changed(time: Dictionary) func _on_hour_selection_changed(hour: int) -> void: diff --git a/addons/@bendn/timecontrol/timebutton.gd b/addons/@bendn/timecontrol/timebutton.gd index b188e45..80097f6 100644 --- a/addons/@bendn/timecontrol/timebutton.gd +++ b/addons/@bendn/timecontrol/timebutton.gd @@ -9,13 +9,12 @@ extends Button var timebox: TimeBox var panel: PopupPanel +signal time_changed(time: Dictionary) + func set_time(t: Dictionary = time) -> void: text = TimeBox.fmt_dict_12h(time) time = t - -## this is a required internal object -func get_timebox() -> TimeBox: - return timebox + time_changed.emit(time) func _ready() -> void: text = TimeBox.fmt_dict_12h(time) |