메소드 | 설명 | |
---|---|---|
ActivateScreen ( string screenName ) : Epigene.UI.UIScreen |
Activate a screen by name. This function will deactivat old screen and activate the new one. It will also send a notification to screenChanged(old, new) if any delegates is set.
|
|
Add ( UIType type, |
Adds a UI button.
|
|
AddDialog ( Epigene.UI.UIDialog dialog ) : void |
Add a dialog to available list
|
|
AddScreen ( Epigene.UI.UIScreen screen ) : void |
Add a new screen.
|
|
BlinkImage ( |
Blink an image by numberOfBlinks times. The speed of blinks depends on the speedInMs parameter.
|
|
BlinkToggle ( |
Helper for processing blinking of an image. It will toggle the visible flag based on the preset values
|
|
ChangeLayers ( |
Change layers in game objet and in all of it's children
|
|
CheckTooltipVisibility ( |
Check if the tooltip can be visible at the moment or should be hidden
|
|
Clear ( bool force = false ) : void |
Free up memory with dropping all ui objects. Clears UI elements with removing them from internal lists and destroys them.
|
|
ClearHuds ( ) : void |
Remove all registered screens.
|
|
ClearModels ( ) : void | ||
ClearPopups ( ) : void | ||
ClearScreens ( ) : void |
Remove all registered screens.
|
|
ClearUI ( UIType type ) : void |
Remove all registered UIImages, where type is match
|
|
ContainsButton ( int id ) : bool |
Check if the button already exist.
|
|
ContainsHud ( string id ) : bool |
Check if the Hud already exist.
|
|
ContainsModel ( string id ) : bool |
Check if the Model already exist.
|
|
ContainsPopup ( string id ) : bool |
Check if the Popup already exist.
|
|
ContainsScreen ( string name ) : bool |
Check if the button already exist.
|
|
CreateGameObject ( string prefab ) : |
Helper to create a gameobject from a prefab.
|
|
CreateImage ( string id, string filename, |
Create a new push or toggle button
|
|
CreateTexture ( |
Create a texture from game object. It will clone the object and the camera, create a screenshot of the camera and save it. Set rect to the size of the new image.
|
|
DisableButton ( Epigene.UI.UIButton b ) : void | ||
DisableHuds ( ) : void |
Disable all the huds
|
|
EnableButton ( Epigene.UI.UIButton b ) : void | ||
Get ( int id ) : UIObject | ||
Get ( string name ) : UIObject | ||
GetDialog ( string id ) : Epigene.UI.UIDialog |
Get a dialog from available list by id
|
|
GetHud ( string id, string prefab = null ) : |
Helper to get the game object for a hud. TODOstatic??
|
|
GetHudNames ( object>.Dictionary |
Get name of used huds.
|
|
GetModel ( string id, string prefab = null ) : |
Helper to get the game object for a hud. TODOstatic??
|
|
GetPopup ( string id, string prefab = null ) : |
Helper to get the game object for a popup. TODOstatic??
|
|
GetPopupNames ( object>.Dictionary |
Get name of used popups.
|
|
GetScreen ( string name ) : Epigene.UI.UIScreen | ||
GetScreenId ( ) : string |
Return the active screen Id
|
|
GetVirtualCamera ( float orthSize ) : |
Get a virtual camera, which can render the object alone. The new camera cloned from the current main camera or from a it's prefab in case of no main camera.
|
|
InitUI ( |
Helper to reset/recreate the ui parent objects
|
|
IsLayerVisible ( string layerName ) : bool |
Return if a layer is visible or not
|
|
LoadPrefab ( string prefab, string name, |
Helper to load a prefab by name under specific parent
|
|
LoadResources ( object>.Dictionary |
Load object resources from dictionary TODO make more generic helpers and way of parse similar stuff. ie. transform parameter should be one parser for all
|
|
LoadResources ( string fileName, |
Create a screen from a json file including all ui elements
|
|
LoadSprite ( string fileName ) : UnityEngine.Sprite[] |
Loads a sprite and return a list of textures. If the sprite is in multi mode, the list will contains each sprites. If the sprite is single mode, the list will contains only one item.
|
|
Remove ( int id ) : void |
Remove an image type
|
|
RemoveAllDialog ( ) : void |
Remove ALL dialogs
|
|
RemoveDialog ( string id ) : void |
Remove a dialog by id
|
|
RemoveModal ( ) : void | ||
SaveTextureToFile ( |
Save a texture into a file as png
|
|
Screenshot ( |
Save the rectangle from the camera view as a texture.
|
|
SetResolution ( int w, int h, bool fullScreen ) : void |
Helper to notify when screen is resizes.
|
|
ShowLayer ( string layerName, bool flag ) : void |
Show and hide a layer by name If flag is set to true, it will show the layer if flag is false, it will hide the layer
|
|
ShowModal ( |
Use this function to show (activate) an object in modal mode. While the object is active, it will capture all user inputs and gets all focus. Deactivating the object will trigger the uimanager to go back to normal mode (hide and forget).
|
|
SlideScreen ( string screenName ) : Epigene.UI.UIScreen | ||
ToggleLayer ( string layerName ) : void |
Togle a layer by name
|
|
UIManager ( ) : UnityEngine |
Initializes a new instance of the UIManager class.
|
|
Update ( ) : void |
Process inputs and update state of ui element.
|
메소드 | 설명 | |
---|---|---|
GetObjectUnderCursor ( ) : |
Get an object under the cursor
|
|
GetUIButtonFromObject ( |
Internal helper to get a uiButton from an object
|
|
InternalInit ( ) : void |
public ActivateScreen ( string screenName ) : Epigene.UI.UIScreen | ||
screenName | string | The name of the screen. |
리턴 | Epigene.UI.UIScreen |
public Add ( UIType type, |
||
type | UIType | |
obj | Parent game object. | |
fileName | string | Resource file name with path, relative to Rersources folder. |
spr | ||
리턴 | UIObject |
public AddDialog ( Epigene.UI.UIDialog dialog ) : void | ||
dialog | Epigene.UI.UIDialog | |
리턴 | void |
public AddScreen ( Epigene.UI.UIScreen screen ) : void | ||
screen | Epigene.UI.UIScreen | |
리턴 | void |
public BlinkImage ( |
||
image | ||
numberOfblinks | int | |
speedInMs | double | |
리턴 | void |
public static ChangeLayers ( |
||
obj | ||
name | string | |
리턴 | void |
public CheckTooltipVisibility ( |
||
obj | ||
리턴 | bool |
public static CreateGameObject ( string prefab ) : |
||
prefab | string | |
리턴 |
public CreateImage ( string id, string filename, |
||
id | string | |
filename | string | |
parent | ||
obj | ||
리턴 |
public static CreateTexture ( |
||
obj | ||
rect | ||
orthSize | float | |
리턴 |
public static DisableButton ( Epigene.UI.UIButton b ) : void | ||
b | Epigene.UI.UIButton | |
리턴 | void |
public static EnableButton ( Epigene.UI.UIButton b ) : void | ||
b | Epigene.UI.UIButton | |
리턴 | void |
public GetDialog ( string id ) : Epigene.UI.UIDialog | ||
id | string | |
리턴 | Epigene.UI.UIDialog |
public GetHud ( string id, string prefab = null ) : |
||
id | string | |
prefab | string | |
리턴 |
public GetHudNames ( object>.Dictionary |
||
dict | object>.Dictionary | |
리턴 | List |
public GetModel ( string id, string prefab = null ) : |
||
id | string | |
prefab | string | |
리턴 |
public GetPopup ( string id, string prefab = null ) : |
||
id | string | |
prefab | string | |
리턴 |
public GetPopupNames ( object>.Dictionary |
||
dict | object>.Dictionary | |
리턴 | List |
public GetScreen ( string name ) : Epigene.UI.UIScreen | ||
name | string | |
리턴 | Epigene.UI.UIScreen |
public static GetVirtualCamera ( float orthSize ) : |
||
orthSize | float | |
리턴 |
public static IsLayerVisible ( string layerName ) : bool | ||
layerName | string | |
리턴 | bool |
public LoadPrefab ( string prefab, string name, |
||
prefab | string | |
name | string | |
parent | ||
리턴 |
public LoadResources ( object>.Dictionary |
||
dict | object>.Dictionary | |
gameObject | ||
리턴 | UIObject>.Dictionary |
public LoadResources ( string fileName, |
||
fileName | string | |
gameObject | ||
리턴 | void |
public static LoadSprite ( string fileName ) : UnityEngine.Sprite[] | ||
fileName | string | file name with path relative to Resource folder. |
리턴 | UnityEngine.Sprite[] |
public static SaveTextureToFile ( |
||
texture | ||
fileName | string | |
리턴 | void |
public static Screenshot ( |
||
camera | ||
rect | ||
리턴 |
public SetResolution ( int w, int h, bool fullScreen ) : void | ||
w | int | The new width. |
h | int | The new height. |
fullScreen | bool | |
리턴 | void |
public static ShowLayer ( string layerName, bool flag ) : void | ||
layerName | string | |
flag | bool | |
리턴 | void |
public SlideScreen ( string screenName ) : Epigene.UI.UIScreen | ||
screenName | string | |
리턴 | Epigene.UI.UIScreen |
public static ToggleLayer ( string layerName ) : void | ||
layerName | string | |
리턴 | void |