Repository navigation
v2.1
Breaking Changes
OnEvent("CanvasChange", callback) has been removed. Replace it with a combination of OnDraw(callback) and OnErase(callback)
Revamped the event system. 36 new event triggers are defined. Except for __Delete → OnDelete, all event triggers have identical names to their respective methods.
New Event
EventMoveWindowStorePosition - Saves the window position when the user drags it around (jsong55)
Shorthand
Shorthand syntax for OnEvent("MiddleMouseDown", callback) now becomes OnMiddleMouseDown(callback). Every event can now be called using shorthand syntax.
New Event Triggers
- OnDelete - Called when the object is garbage collected
- OnRemember
- OnForget
- OnDestroy - Called when
TimeOut()andDestroy()is called - OnCreate - Called when the window is created or recreated after being destroyed
- OnInvalidate
- OnValidate
- OnStop
- OnStart
- OnResume
- OnUpdateLayered
- OnHide
- OnShow
- OnScreenshot
- OnFree
- OnAllocate
- OnErase
- OnFill
- OnRecycle
- OnResolve
- OnSave
- OnClear
- OnTimeout - Called when
timeis set in the styles causing the window to expire - OnFlush
- OnPaint
- OnDraw
- OnRender - Called whenever the
.Render()method is called - OnReallocate
- OnRedraw
- OnRerender - Called when the screen size, resolution, dpi, or orientation changes
- OnWait
- OnCooldown
- OnSuspend
- OnAnimate - Called whenever an animation happens, including
FadeInandFadeOut - OnFadeIn
- OnFadeOut
Cooldowns and Animations have been modified to be more consistent.
- FadeOut() can now be called before FadeIn()
- Setting the
timein the styles followed by Cooldown is now the same thing as Suspend(time)TextRender().Draw("test 1", "m:10vmin c:Random t:2400").FadeIn(800).Cooldown().FadeOut(800)TextRender().Draw("test 2", "m:10vmin c:Random").FadeIn(800).Suspend(2400).FadeOut(800)
- Set the timestamp when the animation finishes enabling multiple Cooldown() or Wait()
TextRender().Draw("apple", "t:1000").FadeIn().Cooldown().FadeOut().Cooldown().FadeIn().Cooldown()