Skip to content

Instantly share code, notes, and snippets.

View EricEzaM's full-sized avatar

Eric M EricEzaM

View GitHub Profile
@EricEzaM
EricEzaM / StrideView.xaml
Created July 19, 2022 09:41
Stride3D embed in WPF xaml control
<UserControl x:Class="Namespace.StrideView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Namespace"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<ContentPresenter x:Name="SceneView">
@EricEzaM
EricEzaM / godot_typing_label.gd
Last active April 22, 2024 17:43
A label which progressively shows characters, as if someone was typing.
#########################################################
# Basic Version
#########################################################
extends Label
var timer: Timer
func _ready():
timer = Timer.new()
@EricEzaM
EricEzaM / godot_ticker_smooth.gd
Last active May 3, 2024 22:48
Godot Label Scrolling/Ticker Text
# On the parent, e.g. ColorRect
# This gives this CanvasItem a "clipping mask" that only allows children to display within it's rect.
func _draw():
VisualServer.canvas_item_set_clip(get_canvas_item(), true)
# On the child (Label)
export (float) var scroll_speed = 60
func _process(delta):
rect_position.x -= scroll_speed * delta
@EricEzaM
EricEzaM / flex_grid_container.gd
Last active April 22, 2024 17:43
A responsive grid container for GD script. Updates columns as you change the width.
tool
class_name FlexGridContainer
extends Container
var columns: int = 1 setget set_columns
func _notification(p_what):
match p_what: