This is the object class for displaying a frame image in sprite. But it will scale the image size while minimizing image distortion.
More...
|
| virtual void | update (CCamera *camera) |
| virtual void | render (CCamera *camera) |
|
void | reloadSpriteFrame () |
|
void | setFrameSource (const char *spritePath, const char *frameName, const char *editorFileRef=NULL) |
|
void | setFrame (SFrame *frame) |
|
SFrame * | getFrame () |
|
const char * | getFrameName () |
|
const char * | getSpriteName () |
|
const char * | getSpriteId () |
|
const char * | getFrameId () |
|
void | setAnchor (AnchorType type, float left, float right, float top, float bottom) |
| virtual CObjectSerializable * | createSerializable () |
| virtual void | loadSerializable (CObjectSerializable *object) |
|
void | remove () |
|
void | removeAllChilds () |
|
CCanvas * | getCanvas () |
|
CGUIElement * | getParent () |
|
void | setName (const char *name) |
|
const char * | getName () |
|
const char * | getID () |
|
void | setTagInt (int i) |
|
void | setTagString (const char *s) |
|
int | getTagInt () |
|
const std::string & | getTagString () |
|
void | setName (const wchar_t *name) |
|
std::wstring | getNameW () |
|
void | setParent (CGUIElement *parent) |
|
std::vector< CGUIElement * > & | getChilds () |
|
void | getAllChilds (std::vector< CGUIElement * > &childs) |
|
void | setColor (const SColor &c) |
|
const SColor & | getColor () |
|
float | getHeight () |
|
float | getWidth () |
|
void | setHeight (float h) |
|
void | setWidth (float w) |
|
const core::rectf & | getRect () |
| virtual const core::rectf | getNativeRect () |
|
int | getDepth () |
|
int | getRenderOrder () |
|
void | setDock (EGUIDock dock) |
|
EGUIDock | getDock () |
|
const SMargin & | getMargin () |
|
void | setMargin (const SMargin &m) |
|
void | setMargin (float l, float t, float r, float b) |
|
void | setRect (const core::rectf &r) |
|
void | setWorldTransform (const core::matrix4 &world) |
|
void | setRelativeTransform (const core::matrix4 &relative) |
|
const core::vector3df | getAlignPosition () |
|
const core::vector3df & | getPosition () |
|
void | invalidate () |
|
void | setPosition (const core::vector3df &v) |
|
const core::vector3df & | getScale () |
|
void | setScale (const core::vector3df &v) |
|
const core::vector3df & | getRotation () |
|
void | setRotation (const core::vector3df &v) |
|
core::quaternion | getRotationQuaternion () |
|
EGUIVerticalAlign | getVerticalAlign () |
|
EGUIHorizontalAlign | getHorizontalAlign () |
|
void | setVerticalAlign (EGUIVerticalAlign a) |
|
void | setHorizontalAlign (EGUIHorizontalAlign a) |
|
void | setAlign (EGUIHorizontalAlign h, EGUIVerticalAlign v) |
|
void | setShaderID (int id) |
|
int | getShaderID () |
|
int | getMaterialId () |
|
void | setMaterialId (int id) |
|
void | setMaterial (CMaterial *material) |
|
void | setMaterialSource (const char *materialFile) |
|
CMaterial * | getMaterial () |
|
CGUIMask * | getMask () |
|
CGUIMask * | getParentMask () |
|
void | setMask (CGUIMask *mask) |
|
void | setDrawBorder (bool b) |
|
bool | isEnableMaterial () |
|
const core::matrix4 & | getRelativeTransform () |
|
const core::matrix4 & | getAbsoluteTransform () |
|
void | setVisible (bool b) |
|
bool | isVisible () |
|
bool | isVisibleInHierarchy () |
|
CEntity * | getEntity () |
|
void | notifyChanged () |
|
CGUIElement * | getChildBefore (CGUIElement *object) |
|
void | bringToNext (CGUIElement *object, CGUIElement *target, bool behind) |
|
void | bringToChild (CGUIElement *object) |
|
bool | isChild (CGUIElement *e) |
|
CGUIElement * | getGUIByPath (const char *path) |
|
void | generateNewId () |
|
|
| CGUIFitSprite (CCanvas *canvas, CGUIElement *parent, SFrame *frame) |
|
| CGUIFitSprite (CCanvas *canvas, CGUIElement *parent, const core::rectf &rect, SFrame *frame) |
|
| CGUIElement (CCanvas *canvas, CGUIElement *parent) |
|
| CGUIElement (CCanvas *canvas, CGUIElement *parent, const core::rectf &rect) |
|
void | applyCurrentMask (CGUIMask *mask) |
|
CGUIMask * | getCurrentMask () |
|
bool | removeChild (CGUIElement *child) |
This is the object class for displaying a frame image in sprite. But it will scale the image size while minimizing image distortion.
- See also
- CSpriteFrame
CSpriteFrame* sprite = CSpriteManager::getInstance()->loadSprite(
"Assets/SampleGUI/SampleGUI.spritedata")
SFrame* frame = sprite->getFrame(
"dialog");
gui->setAnchor(CGUIFitSprite::AnchorAll, 20.0f, 20.0f, 20.0f, 20.0f);
This class manages GUI components, including creating and deleting images and sprites.
Definition CCanvas.h:79
CGUIFitSprite * createFitSprite(SFrame *frame)
Create a fit sprite element with a frame as a child of root.
The object class holds data on an image, including the locations of sprites and frames on it.
Definition CSpriteFrame.h:144
rect< f32 > rectf
Rectangle with float values.
Definition rect.h:271
The gui namespace contains useful classes for easy creation of a graphical user interface.
Definition ICursorControl.h:15
Definition CSpriteFrame.h:93