luna engine
software engine
Loading...
Searching...
No Matches
luna::nodes::itemListNode Class Reference

#include <itemListNode.h>

Inheritance diagram for luna::nodes::itemListNode:
Collaboration diagram for luna::nodes::itemListNode:

Public Member Functions

 itemListNode ()=default
 
virtual ~itemListNode ()=default
 
 itemListNode (Node node)
 
 itemListNode (entt::entity handle, luna::scene *scene)
 
 itemListNode (luna::scene *scene)
 
virtual void init (luna::scene *scene) override
 
int addItem (const std::string &pItem, const ref< renderer::texture > &pTexture=ref< renderer::texture >(), bool selectable=true)
 
int addIconItem (const ref< renderer::texture > &pItem, bool selectable=true)
 
void setItemText (int pIdx, const std::string &text)
 
std::string getItemText (int pIdx)
 
void setItemIcon (int pIdx, const ref< renderer::texture > &pIcon)
 
ref< renderer::texturegetItemIcon (int p_idx)
 
glm::vec2 getItemIconRegion (int pIdx)
 
void setItemLanguage (int pIdx, const std::string &language)
 
std::string getItemLanguage (int pIdx)
 
void select (int Idx, bool single=true)
 
int getItemAtPosition (const glm::vec2 &pos, bool exact)
 
void deselect (int pIdx)
 
void deselect_all ()
 
bool isSelected (int pIdx)
 
void setCurrent (int current)
 
int getCurrent ()
 
void moveItem (int fromIdx, int toIdx)
 
void setItemCount (int count)
 
int getItemCount ()
 
void removeItem (int idx)
 
void setItemCustomBgColor (int pIdx, const glm::vec4 &pCustomBgColor)
 
glm::vec4 getItemCustomBgColor (int pIdx)
 
void setItemCustomFgColor (int pIdx, const glm::vec4 &pCustomFgColor)
 
glm::vec4 getItemCustomFgColor (int pIdx)
 
void setItemTagIcon (int p_idx, const ref< renderer::texture > &pTagIcon)
 
void setItemSelectable (int pIdx, bool selectable)
 
bool isItemSelectable (int pIdx)
 
void setItemDisabled (int pIdx, bool disabled)
 
bool isItemDisabled (int pIdx)
 
void clear ()
 
std::vector< int > getSelectedItems ()
 
bool isAnythingSelected ()
 
bool guiInputEvent (Event &p_event)
 
bool mouseMotionEvent (mouseMovedEvent &Event)
 
bool mouseEvent (Event &Event)
 
void shape (int p_idx)
 
- Public Member Functions inherited from luna::nodes::controlNode
 controlNode ()=default
 
 controlNode (entt::entity handle, luna::scene *scene)
 
 controlNode (luna::scene *scene)
 
virtual ~controlNode ()=default
 
virtual void init (luna::scene *scene) override
 
virtual void guiEvent (Event &event)
 
- Public Member Functions inherited from luna::Node
 Node ()=default
 
 Node (entt::entity handle, luna::scene *scene)
 
 Node (uint64_t id, luna::scene *scene)
 
 Node (scene *scene)
 
virtual ~Node ()=default
 
void setName (std::string name)
 
void addChild (Node node)
 
virtual void init (scene *scene) override
 
template<typename T , typename... Args>
T & addComponent (Args &&... args)
 
template<typename T , typename... Args>
T & addOrReplaceComponent (Args &&... args)
 
template<typename T >
T & getComponent ()
 
template<typename T >
bool hasComponent ()
 
template<typename T >
void removeComponent ()
 
 operator bool () const
 
 operator entt::entity () const
 
 operator uint32_t () const
 
 operator scene * () const
 
uuid getUUID ()
 
const std::string & getName ()
 
bool operator== (const Node &other) const
 
bool operator!= (const Node &other) const
 
- Public Member Functions inherited from luna::object
virtual void init (scene *scene)=0
 
virtual void bindMethods ()
 

Additional Inherited Members

- Protected Attributes inherited from luna::Node
entt::entity entityHandle { entt::null }
 
scenescene = nullptr
 

Constructor & Destructor Documentation

◆ itemListNode() [1/4]

luna::nodes::itemListNode::itemListNode ( )
default

◆ ~itemListNode()

virtual luna::nodes::itemListNode::~itemListNode ( )
virtualdefault

◆ itemListNode() [2/4]

luna::nodes::itemListNode::itemListNode ( Node  node)

◆ itemListNode() [3/4]

luna::nodes::itemListNode::itemListNode ( entt::entity  handle,
luna::scene scene 
)

◆ itemListNode() [4/4]

luna::nodes::itemListNode::itemListNode ( luna::scene scene)

Member Function Documentation

◆ addIconItem()

int luna::nodes::itemListNode::addIconItem ( const ref< renderer::texture > &  pItem,
bool  selectable = true 
)

◆ addItem()

int luna::nodes::itemListNode::addItem ( const std::string &  pItem,
const ref< renderer::texture > &  pTexture = ref<renderer::texture>(),
bool  selectable = true 
)

◆ clear()

void luna::nodes::itemListNode::clear ( )

◆ deselect()

void luna::nodes::itemListNode::deselect ( int  pIdx)

◆ deselect_all()

void luna::nodes::itemListNode::deselect_all ( )

◆ getCurrent()

int luna::nodes::itemListNode::getCurrent ( )

◆ getItemAtPosition()

int luna::nodes::itemListNode::getItemAtPosition ( const glm::vec2 &  pos,
bool  exact = false 
)

◆ getItemCount()

int luna::nodes::itemListNode::getItemCount ( )

◆ getItemCustomBgColor()

glm::vec4 luna::nodes::itemListNode::getItemCustomBgColor ( int  pIdx)

◆ getItemCustomFgColor()

glm::vec4 luna::nodes::itemListNode::getItemCustomFgColor ( int  pIdx)

◆ getItemIcon()

ref< renderer::texture > luna::nodes::itemListNode::getItemIcon ( int  p_idx)

◆ getItemIconRegion()

glm::vec2 luna::nodes::itemListNode::getItemIconRegion ( int  pIdx)

◆ getItemLanguage()

std::string luna::nodes::itemListNode::getItemLanguage ( int  pIdx)

◆ getItemText()

std::string luna::nodes::itemListNode::getItemText ( int  pIdx)

◆ getSelectedItems()

std::vector< int > luna::nodes::itemListNode::getSelectedItems ( )

◆ guiInputEvent()

bool luna::nodes::itemListNode::guiInputEvent ( Event p_event)

◆ init()

void luna::nodes::itemListNode::init ( luna::scene scene)
overridevirtual

Reimplemented from luna::nodes::controlNode.

◆ isAnythingSelected()

bool luna::nodes::itemListNode::isAnythingSelected ( )

◆ isItemDisabled()

bool luna::nodes::itemListNode::isItemDisabled ( int  pIdx)

◆ isItemSelectable()

bool luna::nodes::itemListNode::isItemSelectable ( int  pIdx)

◆ isSelected()

bool luna::nodes::itemListNode::isSelected ( int  pIdx)

◆ mouseEvent()

bool luna::nodes::itemListNode::mouseEvent ( Event Event)

◆ mouseMotionEvent()

bool luna::nodes::itemListNode::mouseMotionEvent ( mouseMovedEvent Event)

◆ moveItem()

void luna::nodes::itemListNode::moveItem ( int  fromIdx,
int  toIdx 
)

◆ removeItem()

void luna::nodes::itemListNode::removeItem ( int  idx)

◆ select()

void luna::nodes::itemListNode::select ( int  Idx,
bool  single = true 
)

◆ setCurrent()

void luna::nodes::itemListNode::setCurrent ( int  current)

◆ setItemCount()

void luna::nodes::itemListNode::setItemCount ( int  count)

◆ setItemCustomBgColor()

void luna::nodes::itemListNode::setItemCustomBgColor ( int  pIdx,
const glm::vec4 &  pCustomBgColor 
)

◆ setItemCustomFgColor()

void luna::nodes::itemListNode::setItemCustomFgColor ( int  pIdx,
const glm::vec4 &  pCustomFgColor 
)

◆ setItemDisabled()

void luna::nodes::itemListNode::setItemDisabled ( int  pIdx,
bool  disabled 
)

◆ setItemIcon()

void luna::nodes::itemListNode::setItemIcon ( int  pIdx,
const ref< renderer::texture > &  pIcon 
)

◆ setItemLanguage()

void luna::nodes::itemListNode::setItemLanguage ( int  pIdx,
const std::string &  language 
)

◆ setItemSelectable()

void luna::nodes::itemListNode::setItemSelectable ( int  pIdx,
bool  selectable 
)

◆ setItemTagIcon()

void luna::nodes::itemListNode::setItemTagIcon ( int  p_idx,
const ref< renderer::texture > &  pTagIcon 
)

◆ setItemText()

void luna::nodes::itemListNode::setItemText ( int  pIdx,
const std::string &  text 
)

◆ shape()

void luna::nodes::itemListNode::shape ( int  p_idx)

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