SUI/godot/Test.gd

33 lines
2.1 KiB
GDScript3
Raw Normal View History

# STAROPENSOURCE UI SOURCE FILE
# Copyright (c) 2024 The StarOpenSource Project & Contributors
# Licensed under the GNU Affero General Public License v3
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
2024-03-23 13:18:44 +01:00
extends Control
2024-05-08 20:45:33 +02:00
@onready var logger: CoreLoggerInstance = get_node("/root/CORE").logger.get_instance("Test.gd", self)
2024-03-23 13:18:44 +01:00
func _ready() -> void:
$SuiIconButton.connect("up", func() -> void: logger.info("SuiIconButton: up()"))
$SuiIconButton.connect("down", func() -> void: logger.info("SuiIconButton: down()"))
$SuiIconButton.connect("pressed", func() -> void: logger.info("SuiIconButton: pressed()"))
$SuiIconButton.connect("toggled", func(toggled: bool) -> void: logger.info("SuiIconButton: toggled(toggled=" + str(toggled) + ")"))
$SuiTextButton.connect("up", func() -> void: logger.info("SuiTextButton: up()"))
$SuiTextButton.connect("down", func() -> void: logger.info("SuiTextButton: down()"))
$SuiTextButton.connect("pressed", func() -> void: logger.info("SuiTextButton: pressed()"))
$SuiTextButton.connect("toggled", func(toggled: bool) -> void: logger.info("SuiTextButton: toggled(toggled=" + str(toggled) + ")"))
$SuiText.connect("meta_clicked", func(meta: Variant) -> void: logger.info("SuiText: meta_clicked(meta=" + str(meta) + ")"))
$SuiText.connect("meta_hover_started", func(meta: Variant) -> void: logger.info("SuiText: meta_hover_started(meta=" + str(meta) + ")"))
$SuiText.connect("meta_hover_ended", func(meta: Variant) -> void: logger.info("SuiText: meta_hover_ended(meta=" + str(meta) + ")"))