hx3d  1
2D/3D Simple Game Framework
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
hx3d::gui::ImageButton Class Reference

GUI image button. More...

#include <image_button.hpp>

Public Member Functions

void setOnClickCallback (std::function< void()> func)
 Set the on click callback. More...
 
void onClick (glm::vec2 position)
 On click check. More...
 
- Public Member Functions inherited from hx3d::graphics::Sprite
 Sprite ()
 Create a sprite without texture. More...
 
void setTexture (const Ptr< Texture > &texture)
 Set the sprite texture. More...
 
void setTexture (Framebuffer &buffer)
 Set the sprite texture from a framebuffer color buffer. More...
 
void setTexture (TextureRegion &region)
 Set the sprite texture from a texture region. More...
 
Ptr< TexturegetTexture ()
 Get the sprite texture. More...
 
void scaleTexture ()
 Scale the texture coordinates following the texture size.
 
virtual void draw (Ptr< Shader > shader) override
 Draw the mesh using a shader. More...
 
- Public Member Functions inherited from hx3d::graphics::Mesh
void setTint (Color tint)
 Set the mesh tint. More...
 
ColorgetTint ()
 Get the mesh tint. More...
 
void updateColor ()
 Update the mesh color from the tint.
 
void setGeometry (Ptr< geom::BaseGeometry > geometry)
 Set the mesh geometry. More...
 
Ptr< geom::BaseGeometry > & getGeometry ()
 Get the mesh geometry. More...
 

Additional Inherited Members

- Public Attributes inherited from hx3d::graphics::Mesh
Transform transform
 Mesh transformation.
 
- Protected Attributes inherited from hx3d::graphics::Mesh
Color _tint
 Tint color.
 
Ptr< geom::BaseGeometry_geometry
 Current geometry.
 

Detailed Description

GUI image button.

Definition at line 32 of file image_button.hpp.

Member Function Documentation

void hx3d::gui::ImageButton::onClick ( glm::vec2  position)
inline

On click check.

Parameters
positionClick position

Definition at line 50 of file image_button.hpp.

void hx3d::gui::ImageButton::setOnClickCallback ( std::function< void()>  func)
inline

Set the on click callback.

Parameters
funcFunction

Definition at line 41 of file image_button.hpp.


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