Differences

This shows you the differences between two versions of the page.

Link to this comparison view

modding_ui_popup [2012/07/27 11:58] (current)
184.70.162.50 created
Line 1: Line 1:
 +====== Show a UI Popup in Battle ======
 +Using UI popups is a fairly straightforward task, but it does have a number of components.  There are in fact two ways you can do this.  The first is to create an entirely new UI control and show that, but generally you will only want to pop up some information to show the player, and wish to use an existing popup dialog.  This is what we will explain here.
 +
 +The command you need to add to your mission script is:
 +
 +ShowUIScreenX( Control, Animation , Strings, Images) ;
 +
 +so an example would be
 +
 +ShowUIScreen( "BattlePop0", "Anim1", "IDS_MP_INTRO_NEUTRAL", "BP0Image:US_infantry_head") ;
 +
 +The parameters are as follows:
 +
 +**Control**
 +
 +The name of the top level object in the control
 +
 +**Animation**
 +
 +The animation you want to play on the control when it is displayed.  This can be an empty string if no animation is required.
 +
 +**Strings**
 +
 +The system is set up to allow for an arbitrary number of strings which can be customised on a control.  The string passed in here is a base string on to which the names of any UI text objects in the popup are added.  The system then looks for a string with this name to place on the object.  For example, in the BattlePop0.txt UI file there is a text object with the name BP0TEXT.  So the string which the above example will attempt to display on the popup would need to be defined as
 +
 +IDS_MP_INTRO_NEUTRAL_BP0TEXT, "this is the string",
 +
 +more complex popups could have multiple string objects, which you could match with strings named appropriately.
 +
 +**Images**
 +
 +This optional string defines any images you wish to apply to the control.  It is made up of object:filename pairs, seperated by a $ symbol.  An example would be:
 +
 +"Image1:file1$image2:file2"
 +
 +the filename should not contain the type (e.g. should be FILE rather than FILE.TGA) and is searched for in the local and then the global DATA\UI\TEXTURES folder.
  
modding_ui_popup.txt · Last modified: 2012/07/27 11:58 by 184.70.162.50
 
Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki