Method | Description | |
---|---|---|
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.
|
Method | Description | |
---|---|---|
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. |
return | 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 | ||
return | UIObject |
public AddDialog ( Epigene.UI.UIDialog dialog ) : void | ||
dialog | Epigene.UI.UIDialog | |
return | void |
public AddScreen ( Epigene.UI.UIScreen screen ) : void | ||
screen | Epigene.UI.UIScreen | |
return | void |
public BlinkImage ( |
||
image | ||
numberOfblinks | int | |
speedInMs | double | |
return | void |
public static ChangeLayers ( |
||
obj | ||
name | string | |
return | void |
public CheckTooltipVisibility ( |
||
obj | ||
return | bool |
public static CreateGameObject ( string prefab ) : |
||
prefab | string | |
return |
public CreateImage ( string id, string filename, |
||
id | string | |
filename | string | |
parent | ||
obj | ||
return |
public static CreateTexture ( |
||
obj | ||
rect | ||
orthSize | float | |
return |
public static DisableButton ( Epigene.UI.UIButton b ) : void | ||
b | Epigene.UI.UIButton | |
return | void |
public static EnableButton ( Epigene.UI.UIButton b ) : void | ||
b | Epigene.UI.UIButton | |
return | void |
public GetDialog ( string id ) : Epigene.UI.UIDialog | ||
id | string | |
return | Epigene.UI.UIDialog |
public GetHud ( string id, string prefab = null ) : |
||
id | string | |
prefab | string | |
return |
public GetHudNames ( object>.Dictionary |
||
dict | object>.Dictionary | |
return | List |
public GetModel ( string id, string prefab = null ) : |
||
id | string | |
prefab | string | |
return |
public GetPopup ( string id, string prefab = null ) : |
||
id | string | |
prefab | string | |
return |
public GetPopupNames ( object>.Dictionary |
||
dict | object>.Dictionary | |
return | List |
public GetScreen ( string name ) : Epigene.UI.UIScreen | ||
name | string | |
return | Epigene.UI.UIScreen |
public static GetVirtualCamera ( float orthSize ) : |
||
orthSize | float | |
return |
public InitUI ( |
||
parent | ||
return | void |
public static IsLayerVisible ( string layerName ) : bool | ||
layerName | string | |
return | bool |
public LoadPrefab ( string prefab, string name, |
||
prefab | string | |
name | string | |
parent | ||
return |
public LoadResources ( object>.Dictionary |
||
dict | object>.Dictionary | |
gameObject | ||
return | UIObject>.Dictionary |
public LoadResources ( string fileName, |
||
fileName | string | |
gameObject | ||
return | void |
public static LoadSprite ( string fileName ) : UnityEngine.Sprite[] | ||
fileName | string | file name with path relative to Resource folder. |
return | UnityEngine.Sprite[] |
public static SaveTextureToFile ( |
||
texture | ||
fileName | string | |
return | void |
public static Screenshot ( |
||
camera | ||
rect | ||
return |
public SetResolution ( int w, int h, bool fullScreen ) : void | ||
w | int | The new width. |
h | int | The new height. |
fullScreen | bool | |
return | void |
public static ShowLayer ( string layerName, bool flag ) : void | ||
layerName | string | |
flag | bool | |
return | void |
public ShowModal ( |
||
obj | ||
return | void |
public SlideScreen ( string screenName ) : Epigene.UI.UIScreen | ||
screenName | string | |
return | Epigene.UI.UIScreen |
public static ToggleLayer ( string layerName ) : void | ||
layerName | string | |
return | void |