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 bd8e43a commit 3e46b9c
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 Original file line Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ FLARE. If not, see http://www.gnu.org/licenses/


using namespace std; 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 * 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 Original file line 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_TOP = 1;
const int VALIGN_BOTTOM = 2; const int VALIGN_BOTTOM = 2;


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


LabelInfo eatLabelInfo(std::string val); LabelInfo eatLabelInfo(std::string val);


Expand Down

0 comments on commit 3e46b9c

Please sign in to comment.