Skip to content

Instantly share code, notes, and snippets.

View Grunerd's full-sized avatar
👀
Looking for new opportunities

Alexander 'Gruni' Grunert Grunerd

👀
Looking for new opportunities
View GitHub Profile
@Grunerd
Grunerd / DebugRenderMode.gd
Last active November 23, 2023 18:37
Enable and toggle through Render Modes in Godot 4.x
# Taken from TokisanGames: https://www.reddit.com/r/godot/comments/d459x2/finally_figured_out_how_to_enable_wireframes_in/
# There is a total of 25 draw modes at the time of this, for further information take a look at the ViewportDebugDraw-Enum:
# I found the first 5 to be worth using.
# https://docs.godotengine.org/en/stable/classes/class_renderingserver.html#enum-renderingserver-viewportdebugdraw
extends Node
@onready var vp = get_viewport()
func _ready() -> void:
@Grunerd
Grunerd / LabelFontScaler.gd
Last active October 11, 2023 17:44
LabelFontScaler for Control Node in Godot 4
extends Control
# ensure that you attach this script to the parent node of your ui elements
# ensure that you link the signal "resize" of this control node to this script
#
@export_enum("Horizontal","Vertical") var scaleMode = "Vertical"
# cache for all labels and ther initial font size