Road to 1.0.4

Users are nervously waiting for the next Squid version, so i thought it would be a good time to give a little rundown on what’s going to happen in 1.0.4, which is just around the corner.

There are a few things in 1.0.4 that i’d like to explain in more detail, as i’m convinced that users will wonder about some of my decisions in this version.

Breaking Changes


1. Control.Initialize was removed
The Initialize method used to be called in the Control base class, subclassed controls then used to override Initialize. This lead to subclass constructors being called after Initialize, which was confusing for most users and rarely useful. Because of this, we decided to remove Initialize completely.
As a result, all controls are now initialized in their constructors.

2. UVCoords were removed and replaced with Rectangle.
Style textures are now expressed in pixels instead of UV coords.
This makes building styles a lot easier, thinking in pixels is much more straight forward.
Thanks to all the Beta testers that urged me to make this happen!

3. Changed 2 method signatures in ISquidRenderer
ISquidRenderer.DrawTexture now uses a Rectangle instead of UVCoords.
The Rectangle represents the source texture rectangle in pixels.
Most renderer implementations benefit from this change, since Graphics APIs usually work with a similar rectangle struct layout.
ISquidRenderer.SetScissor now uses width/height parameters, instead of x2/y2
A small but important change to avoid redundant calculations in renderer implementations.

4. HScrollbar and VScrollbar replaced with ScrollBar
These two controls were redundant, so now there’s only one control, the ScrollBar.
You can change between horizontal/vertical scrolling via the Orientation property.

5. Naming conventions
We’ve aligned the naming conventions for events with those proposed and used by Microsoft.
Before 1.0.4 : control.OnMouseClick
After 1.0.4 : control.MouseClick

Fixes and Improvements


A lot of fixes to TextBox!

Such as blinking caret, clean linebreaks, selection color, and most importantly improved Text alignment.
When different font sizes are used in one line, the fonts will now align to their baseline.
Note that this is a first iteration of this fix and will most likely need some tweaking in the near future.
Further bugfixes include missing caret on first character and a wrong textoffset when selected text was deleted in a scrolled textbox.

Multiline TextBox aka TextArea!
This new control, as the name already reveals, provides multiline input, selection and arrow key navigation.
For now it does not support BBCode nor auto-textwrap, hard linebreaks are of course respected.
Both are being worked on and will hopefully make it into 1.0.5 or even an earlier hotfix.

Sample Project
We’re working on a new sample, with the intention of gearing it more towards a typical “Game” user interface. You will find a range of widgets that you are familiar with from many games, like an Inventory, Skillbook, Chatpanel, ActionBars, StatusBars, PaperDoll, item/action tooltips, and a command line Console.

Watch out for 1.0.4 hitting the download area very soon!

Note to Unity users: 1.0.4 will be out for Unity shortly after the SDK is updated. 

Posted in SQUID

Leave a Reply

Your email address will not be published.