Skip to content

Features

Quetzy edited this page Jun 20, 2022 · 5 revisions

Because YUI runs from data files, it can reload any changes you make to those files while the game is running. This allows very fast iteration, and you can even build out whole interfaces from scratch without restarting anything. It does require some quick configuration in order to find the source files on your computer.

Getting game data into the UI is easy thanks to a simple and flexible data binding system. This works similarly to many data binding patterns, such as in various web frameworks, or WPF. One thing to remember in YUI is that data binding only goes one way, from the game to the UI. To get data from the UI back to the game, you have to call a script via an event.

Many UI frameworks are fun to use until you have to do drag and drop and suddenly everything gets very complicated! YUI handles all the hard parts for you--in fact, you don't even have to write code to use drag and drop! In YUI, drag and drop is a type of interaction, and you can define custom drag and drop behavior in an interaction definition file. This includes when drag and/or drop should be allowed, what to render when dragging, what to render on drop targets, what script to call when you drop, and even what script to call if the drop is cancelled.

YUI is built to support theming your UIs, which means you can easily set up button sprites, default fonts, background and border colors, and many other properties in a theme file. You can use multiple themes throughout your project, and quickly make changes to an entire UI just by changing editing theme properties.

YUI has a powerful widget template system, which allows you to create re-usable chunks of UI and insert them into other portions of UI very easily. Widget templates support defining your own custom properties and events, which allows you to encapsulate internal widget behavior in an easily understandable way.