CWindowMgr¶
You need to add this script by AddComponent in “Awake” method of CMainSystem.
This script manages windows.
All windows are created by this manager.
-
class CWindowMgr
¶ -
void
setUIResolution
(Single width, Single height)¶ - Param width
Sets the screen width of the UI. If the value is 0, the scaling factor is calculated relative to the height.
- Param height
Sets the screen height of the UI.Only If width = 0, calculates the scaling factor with respect to the height.
Sets the screen height of the UI. Only if width = 0,calculates the scaling factor with respect to the height.
Case: width != 0
Determines the UI screen size relative to width.
Case: width = 0 and height != 0
Determines the UI screen size relative to height.
Case: width = 0 and height = 0(Default)
It conforms to the screen size of the terminal.
-
Boolean
initialize
(CAssetBundle[] aAB)¶
Expand and initialize the loaded window resource.If CassetBundleMgr is registered, it will automatically download the window resources from the server and pass them to this function.
Expands and initializes window resources loaded as byte data.
Loads and initializes the window resource with the specified asset name from the resource data.
The actual imported asset is named assetname + “.asset”.
-
WindowScript
create
<WindowScript> (UInt32 id, CWindowBase cParent = null)¶ - The class name of the window to create.
The class name of the window to create.
- Param uint id
Window ID
- Param CWindowBase cParet
Parent window
Creates a window of the specified class.
-
WindowScript
find
<WindowScript> (UInt32 id)¶ - The class name of the window to create.
Window class name
- Param uint id
Window ID
Finds the specified window. If not yet created, null is returned.
-
void
bringToTop
(CWindowBase cWindow)¶ - Param CWindowBase cWindow
target window
rise a priority of target window.
Gets the string from the specified caption ID.
Play the SE
Specifies a standard sound to be played when touched.
Specifies a standard sound to be played when scrolling through a list box.
-
static CWindowMgr
Instance
{ get; }¶
Gets an instance of a window manager.
-
void