00000000

From SimsWiki
Revision as of 07:20, 30 July 2012 by MarkGonzales (Talk | contribs)

Jump to: navigation, search
This article is imported from the old MTS2 wiki. You can help Sims2Wiki by cleaning it up. It's original page with comments can be found at http://old_wiki.modthesims2.com/UI
00000000
Short name: UI
Long name: UI data

Maxis User Interfaces

The Following properties were unknown as of the last update.

-- 24 Remaining --
winflag_sortable (common)
winflag_mousetrans (common)
allowinsert (textedits)
insertindex (textedits)
insertpos (textedits)
fnone (grid)
shiftcaption (button)
option (optgrp) - defines this options information
autofilltype (optgrp) - for filling the whole option control
imagetype
size
setlineontop
setlinevisible
thumbimage
containerimage
selection
fillalphahilite
fillcolorhilite
filter
drivelistsize
autofillsize
root
wingridcell
winflag_container
SimCity 4 UI Definition Files - 24 properties missing at last count
========

SimCity 4 defines all of its user interface elements, or UI elements, through a text-based file similar to XML. SimCity 4 UI's are composed of legacy tags, which contain attributes defining the type of element, its look and behavior, etc. Legacies can have children, which contain more legacy tags defining child elements. SC4 UI files are not valid XML, but are very similar. It is now known that these files also comprise the UI elements of newer maxis games such as The Sims 2.

The differentes between UI files and XML are as follows:
1) In a UI file, a comment is denoted by a # at the beginning of a line. 
In XML, a comment is denoted by a tag, contstruted as so: <!-- comment here -->
2) In a UI file, legacy tags are not properly terminated. They have no closing tag or 
terminating bracket. UI LEGACY tags are simply closed by a >.
In XML, a tag must be terminated in one of the two following ways:

<LEGACY />
or
<LEGACY></LEGACY>

3) In a UI file, there is no root tag. There may be more than one LEGACY tag at the root level:
<LEGACY>
<CHILDREN>
<LEGACY>
</CHILDREN>
<LEGACY>

In XML, you can only have one root element. The above code is invalid in XML, but this code would work:
<ROOT>
 <LEGACY>
   <CHILDREN>
	 <LEGACY />
   </CHILDREN>
 </LEGACY>
 <LEGACY />
</ROOT>

4) Attributes in a UI file are never bounded by quotes: <LEGACY clsid=GZWinGen>
In XML, attributes must be bounded by quotes: <LEGACY clsid="GZWinGen">


The differences between XML and UI files poses a bit of a challenge, as a custom parser must be written to handle UI code, or a preparation parser must be written to convert UI code into valid XML. Once an UI file is valid XML, any normal XML parser should be able to generate a DOM in memory out of the UI code.

CHILDREN Tags are used when specifying controls that are inside other controls
IE. You may have a bitmap, and children tags below that which contain controls or trees inside the bitmap ingame.
LEGACY in a UI Is a Base control which contains other controls. If it contains no controls and is an end level class like text edit, it is not a legacy.

UI Classes
-------------
SC4 UI files define user interface elements. This is done through attributes contained in LEGACY tags. The possible number of attributes is quite large, but not all attributes will always be used. First and foremost are the clsid, iid, and id attributes. These all define what kind of element a LEGACY tag is defining. Below is a list of known class id values for UI elements (this is the class id enumeration):

Class ID Description
--------------- -----------------------------------------------
GZWin		Base Control type which all subtypes inherit from.
GZWinGen 	Defines a UI window. This is a container control.
GZWinText 	Defines a simple text label.
GZWinTextEdit 	Defines a text edit box.
GZWinBtn 	Defines a push button.
GZWinBmp 	Defines a bitmap image.
GZWinCustom 	Defines a custom control.
GZWinGrid 	Defines a grid control.
GZWinFlatRect 	Defines a rectangle.
GZWinSlider 	Defines a slider control. (Like school capacity)
GZWinCombo 	Defines a combobox selection control (like mysim zodiac).
GZWinListBox 	Defines a listbox selection control.
GZWinTreeView 	Defines a treeview control.
GZWinSpinner 	Defines a spinner control. (Like tax adjusters).
GZWinOutline 	Defines an outline.
GZWinScrollbar 	Defines a scrollbar.
GZWinFolders    Defines a Folder control.
GZWinOptGrp     Defines an option Group control.
GZWinTextTicker Defines a Text Ticker Control.
GZWinScrollbar2 Defines a Scrollbar of an image style with different parameters.
GZWinLineInput  Defines an Input control.
GZWinFileBrowserDefines a File Browsing control.
SC3WinGen	Defines a Simcity3000 control window.

UI Attributes
-------------
Attribute 	Type  		Description
--------------- --------------- ----------------------------------------------
clsid  		hex or enum 	Defines the class of the control. Can be a hex
					number or a class id. Where class ID's are non-hex they specify
				that the control is standard. Where they are hex, as in some WinGen's
				and WinCustom's, they specify that the overall control is specifically
				defined in the EXE like with IDs, Except CLSID works for the control 
				and its sub-elements as opposed to single Elements like text. 
				Generally speaking a Hexid for a Wingen means a different control window
				completely, so all of the sections from wingen onwards should not be displayed
				all at once. IE in one UI file, you may find 5 different budget windows, identified
				by hexid's for their clsid on a wingen.	
iid  		enum  		Defines the interface id for the control. Will
					always be one of the class id enumeration values
					with an I appended to the beginning. This is what
				Defines the type of interface the control is loaded as.
id  		hex  		An id number in hex. This number identifies the data the control
				deals with as defined in the EXE. It can be used as a sequence
				as in 0000010b 20b and 30b to link three controls together, or
				can be used as an id which can be linked to by the Button ID key
				and Menu ID keys in the exemplar files. It can also simply be an ID
				which identifies that control internally to the executable with no real
				other result. ID may be exempted on non-interactive controls, 
				or unused IDs can be created to facilitate new controls
area  		rectangle 	Defines the bounds of a rectangle that defines
					the controls area. Format: (x,y,width,height)
fillcolor 	color  		Defines the default fill color of the control.
   				Format: (r,g,b)
forecolor	color  		Defines the foreground color of the control.
					Format: (r,g,b)
backcolor 	color  		Defines the background color of the control.
					Format: (r,g,b)
bkgcolor	color		Defines the background color of the control.
caption  	string  	Defines the text used for the controls caption.
captionres 	hex  		Defines the instance id of a localizable string
					to be loaded from SimCityLocale.dat (or other 
					location).
transparent	bool		is the control transparent? Format Y|N

showcaption 	bool  		Specifies weather the caption is shown for the
					control. Format: yes|no
wrapcaption 	bool  		Specifies weather the control caption is wrapped.
					Format: yes|no
winflag_? 	bool  		Defines sp ... \n

== NASA Announces Undersea Exploration Mission ==

An international team of aquanauts will travel again to the bottom of the Atlantic Ocean to simulate a visit to an asteroid in the 16th expedition of NASA Extreme Environment Mission Operations (NEEMO).

 [[http://goodvillenews.com/NASA-Announces-Undersea-Exploration-Mission-9Shwm3.html NASA Announces Undersea Exploration Mission]]

[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]

== Awakening Our Collaborative Spirit ==

The physicist, David Bohm, while researching the lives of Einstein, Heisenberg, Pauli and Bohr, made a remarkable observation. Bohm noticed that their incredible breakthroughs took place through simple, open and honest conversation. He observed, for instance, that Einstein and his colleagues spent years freely meeting and conversing with each other.

 [[http://goodvillenews.com/Awakening-Our-Collaborative-Spirit-AjXaD8.html Awakening Our Collaborative Spirit]]

[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]

== 9 Steps to Achieving Flow (and Happiness) at Work ==

[Flow means] being completely involved in an activity for its own sake. The ego falls away. Time flies. Every action, movement, and thought follows inevitably from the previous one, like playing jazz. --Mihaly Csikszentmihalyi

 [[http://goodvillenews.com/9-Steps-to-Achieving-Flow-and-Happiness-at-Work-LFdIya.html 9 Steps to Achieving Flow (and Happiness) at Work]]

[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]

== Happiness: Getting Our Priorities Straight ==

There is a vitally important shift underway in how we think about progress. Growing numbers of economists, political leaders and expert commentators are calling for better measures of how well society is doing; measures that track not just our economic standard of living, but our overall quality of life. We too can benefit from a shift in priorities and a recognition that real happiness is less about what we earn or own and more about our relationships and state of mind;

 [[http://goodvillenews.com/Happiness-Getting-Our-Priorities-Straight-yQCEpG.html Happiness: Getting Our Priorities Straight]]

[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]

== The Power of Words and Emotional Bonding! ==

If you become steadfast in your abstentions of thoughts of harm directed toward others, all living creatures will cease to feel enmity in your presence. PatanjaliWords have power, incredible power, and this power lies in each and every one of us. Of course, its up to us to use this power for the greater good of all or not.

 [[http://goodvillenews.com/The-Power-of-Words-and-Emotional-Bonding-2wgncv.html The Power of Words and Emotional Bonding!]]

[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox