ManaPlus
Public Member Functions | Data Fields
SkinHelper Struct Reference

Public Member Functions

 SkinHelper ()
 
bool loadList (const SkinParameter *const params, const size_t size)
 

Data Fields

std::string partType
 
int xPos
 
int yPos
 
int width
 
int height
 
ImageRectrect
 
xmlNodePtr * node
 
Imageimage
 

Detailed Description

Definition at line 350 of file theme.cpp.

Constructor & Destructor Documentation

◆ SkinHelper()

SkinHelper::SkinHelper ( )
inline

Definition at line 352 of file theme.cpp.

352  :
353  partType(),
354  xPos(),
355  yPos(),
356  width(),
357  height(),
358  rect(),
359  node(),
360  image()
361  {
362  }
int yPos
Definition: theme.cpp:368
int width
Definition: theme.cpp:369
xmlNodePtr * node
Definition: theme.cpp:372
ImageRect * rect
Definition: theme.cpp:371
int xPos
Definition: theme.cpp:367
int height
Definition: theme.cpp:370
std::string partType
Definition: theme.cpp:366
Image * image
Definition: theme.cpp:373

Member Function Documentation

◆ loadList()

bool SkinHelper::loadList ( const SkinParameter *const  params,
const size_t  size 
)
inline

Definition at line 375 of file theme.cpp.

377  {
378  for (size_t f = 0; f < size; f ++)
379  {
380  const SkinParameter &param = params[f];
381  if (partType == param.name)
382  {
384  image,
385  xPos, yPos,
386  width, height);
387  return true;
388  }
389  }
390  return false;
391  }
Image * grid[9]
Definition: imagerect.h:42
int size()
Definition: emotedb.cpp:306
Image * getSubImage(Image *const parent, const int x, const int y, const int width, const int height)
std::string name
Definition: theme.cpp:300

References Loader::getSubImage(), ImageRect::grid, SkinParameter::index, SkinParameter::name, and EmoteDB::size().

Referenced by Theme::readSkin().

Field Documentation

◆ height

int SkinHelper::height

Definition at line 370 of file theme.cpp.

Referenced by Theme::readSkin().

◆ image

Image* SkinHelper::image

Definition at line 373 of file theme.cpp.

Referenced by Theme::readSkin().

◆ node

xmlNodePtr* SkinHelper::node

Definition at line 372 of file theme.cpp.

◆ partType

std::string SkinHelper::partType

Definition at line 366 of file theme.cpp.

Referenced by Theme::readSkin().

◆ rect

ImageRect* SkinHelper::rect

Definition at line 371 of file theme.cpp.

Referenced by Theme::readSkin().

◆ width

int SkinHelper::width

Definition at line 369 of file theme.cpp.

Referenced by Theme::readSkin().

◆ xPos

int SkinHelper::xPos

Definition at line 367 of file theme.cpp.

Referenced by Theme::readSkin().

◆ yPos

int SkinHelper::yPos

Definition at line 368 of file theme.cpp.

Referenced by Theme::readSkin().


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