Civilization
Public Member Functions | Public Attributes | List of all members
client::GraphicCard Class Reference

class GraphicCard - More...

#include <GraphicCard.hpp>

Public Member Functions

 GraphicCard (const std::string &path, const Json::Value &dataNumber, const float windowLength, const float windowWidth, int index, sf::Font &font)
 
 GraphicCard (const std::string &path, float actionProportion, const float windowLength, const float windowWidth, int actionCardNumber, int index)
 
void moveUpPriorityCard ()
 Move up a priority card when we click on it.
 
void movePriorityCardElements (const Json::Value &dataNumber)
 Move all the elements of a priority card if we move one (title, body, play button, ...) More...
 
void setPositionPriorityCardTexts (sf::Text &text, int refXOffset, int refYOffset, int xOffset, int yOffset)
 Set position of all the different texts on a priority card. More...
 

Public Attributes

std::unique_ptr< client::TextureDisplayertexture
 
std::unique_ptr< sf::Text > title
 
std::string type
 
std::array< std::string, 4 > allBodiesString
 
std::unique_ptr< sf::Text > body
 
int level = 0
 
int bonus
 
bool isUp = false
 
std::unique_ptr< sf::Text > nbOfBoxesText
 
float priorityScale
 
float upScaleProportion
 
int yBodyOffset
 
int windowWidth
 
int windowLength
 
std::unique_ptr< ButtonvalidateButton
 
int difficulty
 

Detailed Description

class GraphicCard -

Member Function Documentation

◆ movePriorityCardElements()

void GraphicCard::movePriorityCardElements ( const Json::Value &  dataNumber)

Move all the elements of a priority card if we move one (title, body, play button, ...)

Parameters
dataNumberjson file that contains all the data necessary to move the elements

◆ setPositionPriorityCardTexts()

void GraphicCard::setPositionPriorityCardTexts ( sf::Text &  text,
int  refXOffset,
int  refYOffset,
int  xOffset,
int  yOffset 
)

Set position of all the different texts on a priority card.

Parameters
texttext to set position
refXOffsetx position from where the x offset begin
refYOffsety position from where the y offset begin
xOffsetx offset
yOffsety offset

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