GUI-eXtended Release Notes

== 1.5.2.0 ==

Designer - Change default code gen language to JavaScript for new Canvases, since the ShowCanvas example script in in JavaScript

Manager - Support quickly changing the draw-order of Canvases
- Added the following methods to the Manager class to allow changing the draw order of any open Canvases at runtime:
 
- MoveCanvasForward( int canvasID )
- MoveCanvasBack( int canvasID )
- MoveCanvasToFront( int canvasID )
- MoveCanvasToBack( int canvasID )
- MoveCanvasToPosition( int canvasID, int newPositionIndex )
- GetCanvasDrawOrderPosition( int canvasID )

ScrollGroup and Group - Mouse events for nested Elements don't clip to the group's view rect
- The children of these Elements were still reacting to mouse input even when they were visually clipped. This has been fixed.

"Using LayoutModes and AutoSize" article: minor issue.
- Wrong values used for aspect ratio docs.

ContextMenu Problem
- The ContextMenu didn't specify default scroll bar GUIStyles, and this broke with newer versions of Unity that no longer accepted that. This is now fixed.

GUIX.SelectBox() - Supported horizontal scroll for items.
- Added size calculation code to allow horizontal scroll for items that are wider than the SelectBox. Set the AllowHorizontalScroll Property to "true" for the SelectBox to enable this feature.

== 1.5.1.0 ==

Add Enum type editor support to the PropertyEditorPlugin
- Now custom Enum (Enumeration) Properties for Elements that are marked editable can be edited from within the Designer. The code generator will properly generate the type assignment code for custom Enum types, generating namespace declaration if applicable, etc.

Fix asset refresh check code, so we only refresh after a Canvas has been saved
- This should improve workflow quite a bit, as the Designer only forces an asset refresh (recompile) when it really needs to, allowing the Designer to open quicker.

Improve isDirty checking so the Designer doesn't nag the user to save if no changes were made
- Greatly improved this check, so the Designer will only ask you to save if you actually changed anything, including custom Properties.
It is now important to set this flag from custom Designer plugins that modify the state of the Canvas to ensure the save prompt is shown. To see how to do this, check the Designer docs for the "Advanced - Extending" section, or the docs for the GUIX.Designer.DesignerUserCanvas.IsDirty Property.

== 1.5.0.0 ==

Change Group Element to disable mouse input handling by default
- This was changed so it provides more natural behaviour. This change may break code that worked off of the assumption that HandleClick was set to true by default for the Group. If you instead set it manually, no change should be needed on your part.

Add Logic handlers for Elements on Append when their name is changed - not just for new Elements
- Now, when renaming an Element and choosing to Append to the logic file on save, the Element you renamed will have fresh handlers generated for it.
This will also do a check to see if any handlers with the new name already exist in the logic file (this can be caused by changing a name back to an old name). If handlers already exist, the Designer will prompt you to connect to those handlers if you like, or change the name instead.

Rewrite name enumeration code so we no longer use random integers to prevent duplicates
- This works in a much more human-friendly way now, the name is enumerated sequentially (name_1, name_2, etc) as needed and is not tagged with a longer (and ugly) random UID. Note: The system uses the first available enumeration index, so if you delete an Element that has an enumerated name, that index will be released, and will likely be used again (even if other enumerated versions with higher indexes are still active). This behaviour is intended. ;-)

Change text on "Append" button for the logic file overwrite prompt to "Append Changes" for clarity
- With the new changes to the Append function, "Append Changes" is more inline with actual behaviour.

Trial expiry string in Designer startup window is cut off slightly with the default skin changes
- Fixed.

GUIXDesignerMenu - when Designer first opened, default scale is not applied
- This would result in the Designer opening up at 200 x 200 window size at the first clean run on later Unity versions, obviously too small to be of any use. Now the first run properly defaults to 1024 x 748.

ScrollGroup blocks mouse input
- The ScrollGroup wasn't properly disabling click handling on the base class before disabling the property itself.

Group offsets children incorrectly
- The extra offset has been removed.

== 1.4.9.0 ==

Flesh out docs on ScrollGroup a bit more, and its properties
- Explained the use of the ViewRect more clearly, etc.

TrackBall - have clicks where no drag has occurred fire the ClickEvent
- Added TrackBall.NullZone to allow adjusting the null zone of the Element. The null zone is the amount you can move the mouse in all directions and still have it register as a click. Move the value beyond the null zone, and it will register as a drag, not firing the click.

Add IsEnabled functionality to Canvas class
- This new Property can be used to disable entire Canvases. Has the same effect as setting each Element's IsEnabled Property to false.

Manager - Add GUIEnabled functionality for toggling input on the entire interface
- Use this when you want to disable the input on all interface Elements drawn by the Manager, including windows.

Expose ScrollGroup's internal Element list
- Added ScrollGroup.GetElementList(). Method returns the internal ArrayList used to store the contained Elements.

Expose Group's Element list
- Added Group.GetElementList(). Method returns the internal ArrayList used to store the Elements.

Manager - Add CanvasesEnabled functionality for toggling input on all Canvases, leaving windows alone
- Use this for disabling input on Canvases only, leaving the windows alone.

Manager - Add WindowsEnabled functionality for toggling input for all windows while leaving Canvases alone
- Use this for disabling input on all windows, while leaving the Canvases alone.

ElementBase - Expose the AutoSizedRect for bounds calculations
- Note that this value will not be valid until the first Draw pass (it is calculated inside DrawPreprocess).

EditorDraw - Change instances of style.Draw(...) to only fire on a Repaint event
- Unity 3 doesn't nicely handle calling this method from other events anymore and will throw an exception. This has been fixed to prevent the exception.

ScrollGroup and other Elements that disable HandleClick need to also disable the Property
- The issue was that if a user sets it to true in their code by mistake, the click handling will be re-activated, messing with the behaviour of the Element when the Property should have been disabled in the first place.

SelectBox.ValueText string comparison throwing InvalidCastException
- Fixed.

Missing Activation section in both documentation builds
- Both documentation packages now include full activation steps.

== 1.4.8.0 ==

Incorrect positioning of Elements added to a ScrollGroup when the group is not positioned at 0,0
- Child Elements used to offset by the same amount as the distance between the origin and the screen's origin. The positioning has been fixed to prevent this issue, and you no longer have to offset the ScrollGroup's ViewRect to compensate.

GUISettings values are not properly assigned to text Elements when skin is assigned via Manager
- This worked when the TextField or TextArea Element was drawn from a Canvas (due to a side-effect of another feature), but failed when the Element was drawn manually or from inside a Window. Now the TextField and TextArea will properly apply the GUISettings values of the Manager's skin.

Store GUIStyle of menu items with the item ADT
- Added a style property to all item classes for menu-like Elements. This allows you to optionally change the visual style of specific items in a menu.

Also added overloaded AddItem(...) and related methods to also support specifying a style.

The GUIStyle set in the item overrides the default style set for the menu Element. If you omit the custom item style, the default one for the menu is used.

Elements this new setup applies to are:
- SelectBox
- ComboBox
- ContextMenu
- StripMenu

Please see the base API docs for the above Elements and the following classes for more information:
- SelectBoxItem
- ComboBoxItem
- ContextMenuItem
- StripMenuItem

Add message to Designer's StripMenu to let users know they can right-click and drag to scale Elements
- Message will show when an Element is selected. Helps people who don't read the docs. ;-)

== 1.4.7.0 ==

Certain Elements should not handle clicks by default
- Box and ProgressBar Elements no longer set HandleClick to true by default. If you were relying on the default values previously, add _myElement.HandleClick = true; or check the HandleClick checkbox in the Designer for the element.

Add IgnoreKeyboard properties for all list elements
- The SelectBox and ComboBox Elements now have an IgnoreKeyboard property. When set to true, the arrow-key scrolling will be disabled.

Add Cancel button to Canvas Settings window to abort changes and get back to the Property Editor<
- This allows you to cancel the Canvas settings edit without having to ensure the values have not been changed.

Update broken link to bug submit form
- The bug report link in the about window of the Designer now points to the new bug report URL.

ElementBase copy ctor does not copy the HandleClick value
- This affected both duplicate in the Designer, and the setup of the Element's default value when adding an Element via the Designer.

Set all Designer SelectBoxes to ignore keyboard input so the nudge feature can be used properly
- This would affect vertical nudging if user had previously selected an item in one of the SelectBoxes in the Designer.

Typo in GUIX base system docs, the "managet" instead of "Manager" on the docs main page
- Fixed typo.

Tooltip text is converted to lowercase when saving a canvas.
- This would have affected custom text properties as well.

ComboBox - Change the ClickEvent to fire on box close if value is changed, rather than on click change
- Now the ClickEvent of the ComboBox will only fire when the box is closed _if_ the value has changed. Will fire if the box is closed either by selection, IsOpen toggling, or clicking the drop-down button again. If the value has not been changed, no event will be fired. The ComboBox used to only fire on click selection, which was unintuitive.

SelectBoxItem class and item class constructors are not fully documented
- SelectBoxItem is now documented, and the constructors of StripMenuItem, ComboBoxItem, SelectBoxItem, and ContextMenuItem are now fully documented.

== 1.4.6.0 ==

GUIX goes crazy when I click Play.
-Fixed bug that could confuse Unity's compiler if you played your game scene while the GUIX Designer was still open, and a few related corner cases. Now the Designer will auto-close itself when you play the scene (it will ask you to save your work first, of course), and refresh the assets the next time you run it from the menu.

== 1.4.5.0 ==

Expose the HandleClick property to the designer
- Exposed the HandleClick property of most elements to the Designer's Property Editor. This now allows you to set up Box elements as Canvas backgrounds without them intercepting the mouse clicks.

Add DrawSolidColor element that will draw a square block of color
- This Element can be created within the Designer, and allows you to select a solid color for it to display. Can optionally handle mouse input as well (default is disabled).

ComboBoxItem, ContextMenuItem, and StripMenuItem are not documented
- Added summary blocks for documentation generator.

InvalidOperationException using GUIX.Manager.CloseCanvas
- Now the Manager's Canvas methods can be safely called from the logic code (and draw code) of a Canvas without causing problems.

Select box does not scroll when arrow keys are used to move down the selection list
- Now the SelectBox will auto-scroll to show the selected item when the arrow keys are used to change the selection to a value outside the view.

Overriding Styles Dilemma
- This issue involved the Canvas draw process overwriting custom runtime style assignments each cycle. Now assigning custom styles to Canvas elements at runtime won't result in them being overwritten each run.

== 1.4.4.0 ==

Add tooltip string property to provide tooltip text storage support
- Added a Tooltip property to the ElementBase, for the storage and later retrieval of a custom tooltip string. Access it via the myElement.Tooltip property. This property is also editable by the Designer.

"Trial Version of GUIX" doesn't seem to show when disabling GUI in Unity 2.5
- The "trial notification" box wasn't displaying when the Trial version of GUIX was disabled in built games for certain cases.

Docs page in Base API docs is broken for LayoutModes and Autosize The LayoutMode and AutoSize documentation page was is linked properly.

GUIX.group
- Fixed Groups throwing errors if their Style Property was not assigned correctly

== 1.4.3.0 ==

Add methods to get full Canvas table and Window table from Manager
- Added Manager.GetCanvasTable() and Manager.GetWindowTable()

Fix null ref (texture) in DrawTexture by not drawing if texture is null
- Fixed null ref exception when user didn't assign a texture, or if the reference was removed.

Default Skin font not properly being applied to elements
- When setting a default Font for the entire Skin rather than just for specific elements, GUIX now applies that default font correctly both in the runtime and in the Designer.

Setting Manager.Skin does not apply skin to elements if Canvas constructor is fired before the skin is set
- Now the skin is applied (if null) on the first draw call of the Canvas, rather than on construction.

Code Generation issue with RU locale settings
- Fixed issues with Cyrillic characters, and related code generation problems.

Fix current canvas size values not loading into the Canvas Settings panel
- The current Canvas size values will now load into the fields, and the field labels have been renamed to "Width" and "Height". The Canvas is also now auto-centered after you apply the size changes.

== 1.4.2.0 ==

GUIX on Windows XP Issues
- Fixed a corner-case focus bug with the Designer.

== 1.4.1.0 ==

(bug)Windows Unity 2.5
- This was a backspace-delete bug was introduced with Unity 2.5. Pressing backspace in a text field would delete the Element (in the Designer). Now the key shortcut to delete a selected element is "Shift-Backspace".

== 1.4.0.0 ==

(Updated GUIX for Unity 2.5, changes below plus lots of internal changes for compatibility)

Combo box over textarea (Expose IsOpen property)
- Allows you to check if the ComboBox is open, and allows you to toggle the open state manually.

Add IsOpen property to ContextMenu
- Now you can check open state, and toggle it.

Add IsOpen property to StripMenu
- Now you can check open state, and toggle it. Useful for forcing a menu close.

Re-Implement windows for the Designer
- Re-implemented windows using a custom system for the Designer, as UT removed the ability to use GUI windows in Designer panels for Unity 2.5.

Drop down list second click to close
- Now the StripMenu will close the drop-down when you click the main menu item a second time

Center the canvas on load
- Ensures the Designer's Canvas view position is reset when loading a new Canvas, in case the view was scrolled off screen with the previous Canvas.

Add "Trial Version of GUIX" when disabling trial GUI in a built game
- Now when you run a built game using the trial version of GUIX, a window will display telling you exactly why the GUI was disabled.

Move canvas settings to property editor
- The Canvas settings have now been moved to the Property Editor for ease of use. You still access the settings the same way - from the Canvas Settings menu item.

Select box - select nothing
- Added SelectBox.ClearSelection() which de-selects the current selection and disables the selection highlight. Valid selection IDs are between 0 and the length of the item list - 1. You can check for an empty selection by comparing the Value against - 1 (and you can set the Value to -1 to deselect quickly as well).

Window doesn't nicely handle having no draw callback set. Throws Window.Do error.
- If you do not set a WindowFunction callback for the window, instead of throwing a Window.Do error, GUIX will show the window, but put the text "No Window Function Set" inside the window to remind you to set the callback.

GUIX.Manager.OpenWindow(...) calls GUI.BringWindowToFront, which does not allow it to be called out of OnGUI
- Manager.OpenWindow(...) can now be called outside of OnGUI, and it no longer throws a "Can't find window with ID x" error.

(Change draw order of Opened Canvases) - GUIX Manager drawing canvases
- When you open a Canvas using the Manager, the new Canvas is now drawn above any other open Canvases.

Typo in TrackBall docs for TrackBall.Sensitivity property
- Fixed typo. :-)

Combo box in window using maxItemDisplayCount
- Fixed a ComboBox scrolling and selection issue when limiting item count.

== 1.3.4.0 ==

GUIX.Button not properly updating style state on mouse down
- Button wasn't visually responding to mouse down/clicks correctly.

== 1.3.1.0 ==

Code Gen doesn't generate logic shell signatures correctly, writes EventData instead of GUIX.EventData
- Fixed missing namespace references in code generation system.

== 1.3.0.0 ==

Add scrolling to StripMenu for long item lists
- Now, when the amount of items exceeds the MaxItemDisplayCount value, scroll arrows are shown to allow scrolling through the sub items on mouse over. The default arrow images can be changed to whatever images you want to provide.

Strip menu item text
- Added EventData struct to provide nice access to additional information about the event. Now multi-item elements such as the SelectBox pass the selected item index and selected item text through to the click events using this struct.

This also means the signature of all the events has changed. To get your pre-1.4 Canvases and handlers to work, do a find and replace to make the replacements shown below (without the quotes of course):

JavaScript:
Find: "args : System.Object[]" Replace with: "eventData : GUIX.EventData"

CSharp: Find: "params object[] args" Replace with: "GUIX.EventData eventData"

Strip menu functions to remove all subitems from a parent item, and to remove parent items
- Added remove methods to the multi-item elements to make it easier to clear the item / element lists for them in one shot.

Added Methods:
- ComboBox.ClearItemList()
- ContextMenu.ClearItemList()
- Group.ClearElementList()
- ScrollGroup.ClearElementList()
- SelectBox.ClearItemList()
- StripMenu.ClearMenuItems()
- StripMenu.ClearMenuSubItems( string parentItem )

== 1.2.2.0 ==

Add seperate label styles for Strip Menu subitems so they can have a different style from the parent items
This feature provides greater skinning flexibility.

Combo box open up not aligning.
- ComboBox didn't properly align the menu box when set to open upwards.

Combo box sending click event on mouse over
- Fixed event notification bug.

Combo box not sending click event when using the keyboard to select an item
- Added support for firing the event on kb select.

Element name bug when hitting Undo, the names are reset to the type, and the old names are still registered, so they cannot be [...]
- Undo would mess up the Element's name when performed.

== 1.2.1.0 ==
(Released Demo Version of GUIX plus the cases below)

Reduce multiplier for nudge tools as it nudges too far
- Dialed down the nudge amount when using the arrow keys to allow for finer control

Add Move Up and Move Back buttons to the Element List plugin window
- Added Move Up and Move Back buttons directly in the Element List window for quick access

Invert Element List so the element at the top of the list is the element at the top of the visual draw order
Now the Element List orders the elements in visual order, rather than the actual order. So Elements at the top of this list draw in front of the elements below. This is far more intuitive. ;-)

Add "Reset Plugin Window positions" option in Views menu in case user drags a window off screen
- Now if you lose a plugin window by dragging it off screen, you can just click on "Views->Reset Plugin Window Positions" and the default positions will be restored

Change links in about box to buttons
- Changed the link text in the Designer's about box to button links. Clicking these will open your browser and direct you to the chosen page quickly.

Add code gen to generate AutoSize settings
- Added code generation methods to properly save AutoSize settings.

Alphabetize Add Element list
- All Elements in the Add Element window are now automatically alphabetized. This also includes custom Elements.

Allow setting AutoSize properties in Property Editor
- We have now added a new mode to the Property Editor that allows you to set the AutoSize properties of your elements live within the Designer.

For an example, create a new Box, add a long string of garbage to its Text property until the text flows out of the bounds of the Box, then in the Property Editor click the "AutoSize Settings" button and try different AutoSize modes, Anchors and limits to see how it behaves.

Refresh the Skin settings when changing the skin, so old elements actually update
- When changing the skin used for a Canvas in the Designer, the Designer now updates the styles for all the Elements on the Canvas. It used to only update new Elements that you added, and cached the old skin for the other Elements. Now it always refreshes all of it.

== 1.1.0.0 ==

Reload Canvas language when re-opening a saved canvas
- Canvases now remember what language they were saved in when loaded into the Designer

Improve docs on Canvas use
- Improved docs explaining Canvas use, and added sample code.

Save Designer Window position and scale
- The Designer Window now saves its position and scale, so users with wide screen setups or huge monitors can get it positioned correctly.

Until UT fixes the bug with Editor Windows losing focus it is recommended that you set the Designer Window to cover your entire screen.

Make right-click select and scale instead of automatically scaling the last selected element
- Now you have to right click directly on the element you wish to scale and drag, as opposed to being able to right-drag anywhere and still scale the selected element. This makes it harder to accidentally scale elements, and also allows you to select elements by right-clicking.

Add Code Gen to provide reference to Canvas class inside Logic class
- Added a variable named "_canvas" and all required initialization to the Code Generation for the Logic file and Canvas file to provide quick access to all elements from within the Logic handlers

Fix StripMenu main item spacing so it looks more uniform
- Changed the way StripMenus space their items and size the drop-down. Now all main items are spaced uniformly taking item width into account, rather than centered in areas of the same width. The old way made your item spacing look odd if you had one wide item and several small ones. The drop-down box now sizes itself to the widest sub-item, and places its x-origin at the parent item's x-origin.

Renamed "StripMenu.ItemWidth" to "StripMenu.ItemSpacing" to reflect this change.

Combo Box control not closing on selection click
- Fixed ComboBox requiring two clicks to select and close the box. Now it selects and closes with the first click.

Designer crashes on close
- Fixed crash bug that appeared for some users when closing the Designer and saving on exit. Designer no longer asks you to refresh Unity assets, as this happens automatically on close now.