UIEditor 0.2 by iLive

WARNING !
The program is a beta. Don't forget it.

Before using it
UIEditor needs SC4 to correctly display UI files. It detects sc4 directory by reading the registry.
It takes text files as input. These files must use the sc4's ui algorythm. 
It produces text files as output. You need a program like the Reader to put the file in a Dat.

How to get an UI file ?
Here is an exemple using the Reader (you need to configure it). Launch the Reader. In the left toolbar,
click on Simcity DAT, select simcity_1.dat. Click on the Filter icon, uncheck all then select UI. Click on 
the 'Refresh' button. The main list is filled with UI files.Close the Filter window. Select a UI file,
right click and select 'Save decoded file'. Enter a filename, your UI file is ready.

How to insert an UI file into a new dat?
Launch the Reader. Click on 'blank DAT' in the left toolbar. Right click on the main list and choose 'Insert file'.
Select your UI file. It is inserted into the DAT. Click on the Save and choose a name. Your dat is ready. Don't forget
to put it in the sc4's plugins directory.

How to replace an existing UI?
Don't replace a UI file located in the simcity main files (in this case, create a new dat).
Launch the Reader. Open the lot which has the UI file to replace. Use the filter to show UI file only. Click on the UI file.
Right click on the UI file entry in the main list and select Text View. Click on edit, select all your text and press backspace.
Open your UI file you want to insert in a text editor (notepad for exemple). Select all the text. Return in the Reader
and paste the text. Click on the Apply Button, then Save the Dat. It's done.


How to use the UIEditor ?
Use the menu or icons to open a UI file. The file is rendered in the main screen.
On the right part of the window, there is a toolbar. The top part of this toolbar shows a tree representing
the UI file, the bottom part shows information (properties) about the selected item. The button 'All properties'
allows you to display and to change all properties of the selected item.
In the current version, you can only move, resize, copy/paste items and change UI properties.
To perform these actions, you need to select one or more items. You can use the mouse and click on an item (if 
you want to select only one), or draw a rectangle around the items you want to select. Once selected, you can add 
items to the selection by holding down the CTRL key and clicking on a new item. To unselect items, click anywhere
outside the selections.
To move a selection, you need to place your cursor on the border of the selection until you see a cross.
To resize an item, move the cursor on the main selected item (the one with small rectangle around it). Once the cursor
shows a double-pointed arrow, you can resize it.
The properties of the main selected item is displayed in the right part of the window.
You can watch the text form of the UI at any moment by clicking on the icon preceding the ?

Other controls
When you select multiple entries, you can align them (or resize them). The reference is the main selected entry.
To perform these actions, use the icons located in bottom toolbar.

Shortcut
CTRL-N			New UI file
CTRL-O			Open a file
CTRL-S			Save a file
CTRL-Z			Undo
CTRL-A			Redo
CTRL-C			Copy
CTRL-X			Cut
CTRL-V			Paste
CTRL-D			Delete
In the main screen
TAB / Shift TAB	Change the current selected item
RETURN			Open 'Properties' dialog


V0.3 : fix some bug with scroll bar
v0.4 : properties can be changed through a property sheet
       add a preview to the import dialog
v0.5 : the property sheet is now modeless
       some tabs added to the property sheet
       images (WinBtn,WinGen...) can be exported