GigaPasjans
Loading...
Searching...
No Matches
Game::CardComponent Class Reference

Component that can visually present Card. More...

#include <CardComponent.h>

Inheritance diagram for Game::CardComponent:
Collaboration diagram for Game::CardComponent:

Public Member Functions

 CardComponent (::Game::Card *card)
 
bool IsSelectable () const override
 Returns value indicating, whether component is selectable.
 
void ProvideActions (Andromenda::ActionRegistry &registry) override
 Provides own actions to the ActionRegistry.
 
void Draw (Andromenda::DrawContext &context) override
 Draws self.
 
- Public Member Functions inherited from Andromenda::Component
bool UpdateState ()
 Checks whether component is dirty, if yes then returns true and sets dirty state to false, else returns false.
 
void SetActive (bool active)
 Sets m_IsActive to given state.
 
Box GetBounds ()
 Returns Component bounds. Position is already aligned.
 
void SetPosition (const Int2 &position)
 Sets position to given.
 

Public Attributes

CardCard
 

Additional Inherited Members

- Protected Member Functions inherited from Andromenda::Component
int32 getCenteredX ()
 Returns X aligned to the center.
 
void markAsDirty ()
 Sets m_Dirty to true.
 
- Protected Attributes inherited from Andromenda::Component
bool m_IsActive = false
 A value indicating, whether object is being pointed by pointer.
 
std::atomic< bool > m_Dirty = false
 A value indicating, whether object is dirty.
 
String m_Id = ""
 Object identifier, that is unique per ComponentRegistry.
 
ComponentCallback m_Callback
 Action component callback.
 
Surfacem_OwnerSurface = nullptr
 Owning surface.
 
Int2 m_Position
 Component position.
 

Detailed Description

Component that can visually present Card.

Member Function Documentation

◆ Draw()

void Game::CardComponent::Draw ( Andromenda::DrawContext & context)
inlineoverridevirtual

Draws self.

Implements Andromenda::Component.

◆ IsSelectable()

bool Game::CardComponent::IsSelectable ( ) const
inlineoverridevirtual

Returns value indicating, whether component is selectable.

Implements Andromenda::Component.

◆ ProvideActions()

void Game::CardComponent::ProvideActions ( Andromenda::ActionRegistry & registry)
inlineoverridevirtual

Provides own actions to the ActionRegistry.

Implements Andromenda::Component.


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