cocos2d-x  3.0-alpha0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
UIHelper Class Reference

#include <UIHelper.h>

Public Member Functions

 UIHelper ()
 Default constructor. More...
 
 ~UIHelper ()
 Default destructor. More...
 
 ~UIHelper ()
 Default destructor. More...
 
 ~UIHelper ()
 Default destructor. More...
 
void init ()
UIWidgetcreateWidgetFromJsonFile (const char *fileName)
 Load a widget with json file. More...
 
var createWidgetFromJsonFile ( var fileName)
 Load a widget with json file. More...
 
local createWidgetFromJsonFile ( local fileName)
 Load a widget with json file. More...
 
void addSpriteFrame (const char *fileName)
void removeSpriteFrame (const char *fileName)
void removeAllSpriteFrame ()
UIWidgetseekWidgetByTag (UIWidget *root, int tag)
 Finds a widget whose tag equals to param tag from root widget. More...
 
local seekWidgetByTag ( local root, local tag)
 Finds a widget whose tag equals to param tag from root widget. More...
 

Static Public Member Functions

static UIHelperinstance ()
static void purgeUIHelper ()
var purgeUIHelper ()
local purgeUIHelper ()

name value.

Finds a widget whose name equals to param name from root widget.

RelativeLayout will call this method to find the widget witch is needed.

Parameters
rootwidget which will be seeked.
Returns
finded result.
float _fileDesignWidth
local _fileDesignWidth
float _fileDesignHeight
Array_textureFiles
UIWidgetseekWidgetByName (UIWidget *root, const char *name)
UIWidgetseekWidgetByRelativeName (UIWidget *root, const char *name)
void setFileDesignWidth (float width)
float getFileDesignWidth ()
void setFileDesignHeight (float height)
float getFileDesignHeight ()
UIWidgetseekActionWidgetByActionTag (UIWidget *root, int tag)

Constructor & Destructor Documentation

UIHelper ( )

Default constructor.

var UIHelper ( )

Default constructor.

local UIHelper ( )

Default constructor.

~UIHelper ( )

Default destructor.

var ~UIHelper ( )

Default destructor.

local ~UIHelper ( )

Default destructor.

Member Function Documentation

void addSpriteFrame ( const char *  fileName)
var addSpriteFrame ( var  fileName)
local addSpriteFrame ( local  fileName)
UIWidget* createWidgetFromJsonFile ( const char *  fileName)

Load a widget with json file.

Returns
a widget created with json file.
var createWidgetFromJsonFile ( var  fileName)

Load a widget with json file.

Returns
a widget created with json file.
local createWidgetFromJsonFile ( local  fileName)

Load a widget with json file.

Returns
a widget created with json file.
float getFileDesignHeight ( )
var getFileDesignHeight ( )
local getFileDesignHeight ( )
float getFileDesignWidth ( )
var getFileDesignWidth ( )
local getFileDesignWidth ( )
void init ( )
var init ( )
local init ( )
static UIHelper* instance ( )
static
var instance ( )
static
local instance ( )
static
static void purgeUIHelper ( )
static
var purgeUIHelper ( )
static
local purgeUIHelper ( )
static
void removeAllSpriteFrame ( )
var removeAllSpriteFrame ( )
local removeAllSpriteFrame ( )
void removeSpriteFrame ( const char *  fileName)
var removeSpriteFrame ( var  fileName)
local removeSpriteFrame ( local  fileName)
UIWidget*
seekActionWidgetByActionTag
( UIWidget root,
int  tag 
)
var seekActionWidgetByActionTag ( var  root,
var  tag 
)
local seekActionWidgetByActionTag ( local  root,
local  tag 
)
UIWidget* seekWidgetByName ( UIWidget root,
const char *  name 
)
var seekWidgetByName ( var  root,
var  name 
)
local seekWidgetByName ( local  root,
local  name 
)
UIWidget* seekWidgetByRelativeName ( UIWidget root,
const char *  name 
)
var seekWidgetByRelativeName ( var  root,
var  name 
)
local seekWidgetByRelativeName ( local  root,
local  name 
)
UIWidget* seekWidgetByTag ( UIWidget root,
int  tag 
)

Finds a widget whose tag equals to param tag from root widget.

Parameters
rootwidget which will be seeked.

tag value.

Returns
finded result.
var seekWidgetByTag ( var  root,
var  tag 
)

Finds a widget whose tag equals to param tag from root widget.

Parameters
rootwidget which will be seeked.

tag value.

Returns
finded result.
local seekWidgetByTag ( local  root,
local  tag 
)

Finds a widget whose tag equals to param tag from root widget.

Parameters
rootwidget which will be seeked.

tag value.

Returns
finded result.
void setFileDesignHeight ( float  height)
var setFileDesignHeight ( var  height)
local setFileDesignHeight ( local  height)
void setFileDesignWidth ( float  width)
var setFileDesignWidth ( var  width)
local setFileDesignWidth ( local  width)

Member Data Documentation

float _fileDesignHeight
protected
var _fileDesignHeight
protected
local _fileDesignHeight
protected
float _fileDesignWidth
protected
var _fileDesignWidth
protected
local _fileDesignWidth
protected
Array* _textureFiles
protected
var _textureFiles
protected
local _textureFiles
protected

The documentation for this class was generated from the following file: