Skip to content

Commit

Permalink
Initialize LabelInfo with sane default values
Browse files Browse the repository at this point in the history
  • Loading branch information
AMDmi3 committed Sep 13, 2012
1 parent 7724ccf commit adace00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/WidgetLabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ FLARE. If not, see http://www.gnu.org/licenses/

using namespace std;

LabelInfo::LabelInfo() : x(0), y(0), justify(JUSTIFY_LEFT), valign(VALIGN_TOP), hidden(false) {
}

/**
* This is used in menus (e.g. MenuInventory) when parsing their config files
*/
Expand Down
6 changes: 4 additions & 2 deletions src/WidgetLabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ const int VALIGN_CENTER = 0;
const int VALIGN_TOP = 1;
const int VALIGN_BOTTOM = 2;

typedef struct LabelInfo {
struct LabelInfo {
int x,y;
int justify,valign;
bool hidden;
}LabelInfo;

LabelInfo();
};

LabelInfo eatLabelInfo(std::string val);

Expand Down

0 comments on commit adace00

Please sign in to comment.