Releases: shdwcat/YUI
0.6.7
⚠ NOTE: Required GM Version is now 2024.11 ⚠
⚠ Breaking change (minor) ⚠
- the previous
switcher.yuiwidget has been renamed toscoped_switcher.yui. The newswitcher.yuidoes not require aselection_scopein order to function (check the Widget Gallery in the example project for how to use it) #95
Primary Improvements
New front page for the example project!
And updated binaries for it in in this release (see below)
You can now use double quotes inside YUI expressions:
For example. text: @name + " name". Note that the normal expression rules still apply, e.g. text: "Name " + @name is not a valid expression, you would need to do: text: @@ "Name " + @name
YUI color constants now support all GM colors and all standard Web colors
GM colors are specified as in GML, e.g. background: c_red. Web color names can be used directly, e.g. color: goldenrod. Additionally, casing on color constants is ignored, so Red and red are both valid.
#36 Implement system for easily adding YUI elements that draw for GM game objects
New object_attachment element that you can use like any other element, though you'll probably want to use it in a panel. For example:
// enemy status bars
- type: panel
elements: @enemies
template:
type: object_attachment
target: @
placement: bottom_center
content:
type: panel
// status bar UI goes hereIn this example, @Enemies is an array of e.g. obj_enemy game objects. The panel will create an object_attachment element for each enemy. target specifies which game object the attachment should use for its position. placement tells it where to arrange the UI relative to the target (and uses the same values supported by tooltip_placement). content is the UI to draw at that position.
#102 Allow specifying sprites for click and hover events for a button
button (or border/panel/etc) background can now by specified like this:
type: button
padding: [10, 10]
background:
type: check_element_state
pressed: ~spr_start_page_button_pressed
hover: ~spr_start_page_button_hover
focused: ~spr_start_page_button_hover
normal: ~spr_start_page_button_default // note: background colors are also allowedNote that a button can be in multiple of these states; the order the checks are evaluated in is pressed -> hover -> focused -> normal. If e.g. hover value is not specified, it will use the next state that is. Currently this feature only applies to background, but if it would be useful on other properties please open an issue for those!
image now allows rendering YUI content as a sprite
YUI can be a convenient layout tool for drawing complex static images from parts like sprites/text/etc. An example might be rendering a card for a deckbuilder. This functionality allows you to create a sprite at runtime from some YUI content, and display that within other YUI content as an image.
NOTE: none of YUI's dynamic behavior like tooltips or button highlighting will work in the image! Sprite animations are not supported either, but will likely be supported in a future version
NOTE: runtime sprites should be cleaned up when no longer used. You can call .destroy() on the sprite cache to delete all sprites tracked in the cache
Example
type: image
sprite_cache: @sprite_cache // this must be a YuiSpriteCache
sprite_cache_id: @cache_id // this is the ID for this generated sprite in the cache
sprite_builder:
type: sprite_builder
content:
type: border
// put your content hereBug Fixes
YUI assets will no longer be stripped when 'Strip unused assets' is enabled.
These are now referenced in __yui_asset_references to prevent the compiler from stripping them
#85 Texts with scribble set to true don't work properly with scrollboxes.
Fixed by using the new gpu scissor functions in 2024.8
And many more...
- Mac should now work regardless of whether file sandbox is enabled or disabled
- grid layout behavior improved
- fixed various bugs related to xoffset/yoffset
- etc
Full Changelog: 0.6.4...0.6.5
0.6.6
Improvements
- new
yui_document_createfunction which allows properly creating yui_document instances from code. This makes it easier to ensure the data_context is correctly set up. - animation now supports 'default' animation which is applied whenever the value changes, such as when the binding for the value returns a different value
- new
set_valueanimation_type which simply sets the variable to the provided value rather than animating over time (useful for e.g. setting a sprite as part of animation) - image.sprite can now be animated (see above)
Bug Fixes
- Fix a number of bugs related to mouse drag behavior for widgets like
slider xoffset/yoffsetnow work when the bound value becomes 0- Fixed crash when attempting to assign to an array index e.g.
@foo[0] = 10 - cursor events like on_click won't trigger on disabled elements
- other minor fixes
Full Changelog: 0.6.5...0.6.6
0.6.5
⚠ Breaking changes ⚠
- 0.6.5 builds on the changes in 0.6.4 introducing the
~assetsyntax for referring to GameMaker assets from .yui files. In 0.6.4 it was mostly required for functions, and optional for other assets like sprites and fonts. It is now required for sprites and fonts as well. In the future it will also be required for animation curves as well. - setting the background of an element has been simplified -- previously if you wanted to bind the background to a sprite or color, you needed to set the value to a struct and bind the values inside that. Since the new syntax allows the system to know whether an asset is being specified, we no longer need to do that, and you can always set
backgrounddirectly as with other normal properties
Primary Improvements
Keyboard navigation behavior has been majorly revamped and should now function much more predictably by default
- You can now customize behavior further: setting
is_focus_scope: trueon any element, even if it isn'tfocusableto have the navigation system detect that element as a possible target, e.g. when navigating from right to left with the keyboard, and then the system will find focusable target within that scope. Previously directional navigation could overshoot elements that weren't precisely in the given direction if a farther one was in the direction. Now you can set container elements as focus scopes to ensure the desired element is reached in these cases. - Once focus is within a scope, navigation will first try to find elements in the desired direction within the same scope. If it can't find something only then will it try again from the outer scope. Focus scopes can be nested, and it will repeat this logic as needed. Scopes remember the last focused item and will re-focus that item the next time focus enters the scope.
- The YUI Inspectron window now has a Generate Focus Debug button which you can use to diagnose focus behavior. This will print a json structure in the log, (as well as copy it to the clipboard) which you can then use to understand the current focus scope tree, what items each scope considers to be its autofocus target, and what it's currently focused item is. If you have trouble understanding the focus navigation behavior, try it out!
New macro in YuiConfiguration: YUI_DEFAULT_IS_NAVIGATION_ACTIVE (default true)
Previously if you wanted Input keyboard navigation to work you had to manually set YuiCursorManager.is_navigation_active = true somewhere in your code, which was tricky because you also had to wait for the object to be created before doing so. Now the value on YuiCursorManager is initialized to the macro value. You can still enable or disable it at runtime if you need to disable UI navigation keys in favor of custom input logic.
Bug Fixes
Quite a few in this release!
Full Changelog: 0.6.4...0.6.5
0.6.4
New Features
YuiScript
-
You can now refer to GM functions/scripts/objects/assets by using
~asset_name, example:on_click: ~yui_log('button clicked!')
(in the case of scripts/functions you must do this rather than how it was in previous versions, see section below)
This replaces the previous|gm_objectmethod of referring to game objects (currently still allowed but will generate a warning).
This also works for referring to sprites frombackgroundorspriteproperties of YUI elements -- in the future you will need to use this method! -
YUI now logs which functions/scripts/assets you use to
datafiles/logs/yui_asset_use_log.csv
In the future this will help with building a whitelist for what is allowed to be called from .yui files, to avoid tampering
(If you're using a git repo make sure to adddatafiles/logs/to your .gitignore file!) -
The 'infix call operator'
>>has been replaced by|>(though both are currently allowed)
https://github.com/shdwcat/yui-vs-code-support/ extension will be updated in the near future to recognize these changes
Fixes
- Fixed miscellaneous minor crashes
⚠ Breaking(ish) change
- Calling scripts/functions from .yui files must use the new
~syntax described above
If you really don't want to update your files right now, you can toggle the macroYUI_ALLOW_UNSAFE_FUNCTION_CALLStotrue
BUT that macro will go away in a future version!
Full Changelog: 0.6.3...0.6.4
0.6.3
Fixes bugs #82 #83 #84 #87 #88
Additional improvements:
image: Animated sprites will play correctly by default (frameis now undefined by default instead of 0)image: now has amirrorproperty which you can use to mirror/flip an image. Usemirror: xto mirror across the x-axis ormirror: yfor the y-axistext: scribble support now includes regions: #90. See the comment there for how to use regions with YUI- .yui strings and binding expressions can now use
[]without putting the string in quotes
For example you can now do:Previously this would have needed to be in quotes:text: Include [wave]bold[/] scribble tags easily
text: "Include [wave]bold[/] scribble tags easily"
Full Changelog: 0.6.2...0.6.3
0.6.2
0.6.1
This release contains fixes for a number of bugs found by toleressea on the discord!
Full Changelog: 0.6.0...0.6.1
0.6.0
New Features
-
Improved runtime debug support via Inspectron (included with YUI)
Shift+Middle-Click on any YUI element to get a debug overlay with information about the element:

-
Basic Gamepad navigation support when used with the Input library
- Input is not included with YUI, please see the Readme for details on how to enable gamepad support
- Some further improvements to this feature are tracked in the issues list, but if you have a specific need let me know.
Scribble Support Change
- Scribble is now optional
- Scribble is no longer included with YUI.
- YUI is designed to be compatible with Scribble 8.7.0 and future 8.x.x versions, and may be compatible with previous 8.x.x versions.
Other improvements
- Mac support fixed
- Mac doesn't use the same forced lowercase logic that linux does, which was not being accounted for and caused YUI to crash
- Thanks to tom on the GM Kitchen discord for testing!
- Minor polish to the Example Project
- Various bug fixes
Full Changelog: 0.5.0...0.6.0
0.5.1
New Features
-
Improved runtime debug support via Inspectron (included with YUI)
Shift+Middle-Click on any YUI element to get a debug overlay with information about the element:

-
Basic Gamepad navigation support when used with the Input library
- Input is not included with YUI, please see the Readme for details on how to enable gamepad support
- Some further improvements to this feature are tracked in the issues list, but if you have a specific need let me know.
Scribble Support Change
- Scribble is now optional
- Scribble is no longer included with YUI.
- YUI is designed to be compatible with Scribble 8.7.0 and future 8.x.x versions, and may be compatible with previous 8.x.x versions.
Other improvements
- Various bug fixes
- Minor polish to the Example Project
Full Changelog: 0.5.0...0.5.1pre
0.5.0
New Feature
- New animation system! Check the example app to see it in action, and play with the demo
New Widget
expanderwidget can expanded (or collapsed) to show/hide nested content
Other Improvements
- Live Reload now works automatically (no more manual configuration)
- and many more
Full Changelog: 0.4.0...0.5.0