From f030154fe727e25a2afe1f78b3998c2d2dba95e4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 18 Aug 2009 09:24:15 +0000 Subject: astyle cleanup, corrects not loading of material textures --- src/core/descriptions.h | 55 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 17 deletions(-) (limited to 'src/core/descriptions.h') diff --git a/src/core/descriptions.h b/src/core/descriptions.h index dec7896..2b4b1e0 100644 --- a/src/core/descriptions.h +++ b/src/core/descriptions.h @@ -11,7 +11,8 @@ #include #include -namespace core { +namespace core +{ class ButtonDescription; class MenuDescription; } @@ -20,38 +21,51 @@ class MenuDescription; #include "model/model.h" #include "filesystem/inifile.h" -namespace core { +namespace core +{ /// description of a menu button class ButtonDescription { public: - enum Align {Center=0, Left=1, Right=2}; + enum Align {Center = 0, Left = 1, Right = 2}; - enum CommandType {CommandNone=0, CommandGame=1, CommandMenu=2}; + enum CommandType {CommandNone = 0, CommandGame = 1, CommandMenu = 2}; ButtonDescription(); ~ButtonDescription(); - + /* -- inspectors ------------------------------------------- */ /// button text - inline const std::string & text() const { return button_text; } + inline const std::string & text() const { + return button_text; + } /// button command type - inline const CommandType command_type() const {return button_commandtype; } + inline const CommandType command_type() const { + return button_commandtype; + } /// button command - inline const std::string & command() const { return button_command; } + inline const std::string & command() const { + return button_command; + } /// button info view model name - inline const std::string & modelname() const { return button_modelname; } + inline const std::string & modelname() const { + return button_modelname; + } /// button info view model - inline const model::Model *model() { return button_model; } - + inline const model::Model *model() { + return button_model; + } + /// button text alignment - inline Align alignment() const { return button_align; } + inline Align alignment() const { + return button_align; + } /* -- mutators -------------------------------------------- */ @@ -88,13 +102,19 @@ public: /* -- inspectors ------------------------------------------- */ /// menu label - inline const std::string & label() const { return menu_label; } + inline const std::string & label() const { + return menu_label; + } /// menu text - inline const std::string & text() const { return menu_text; } + inline const std::string & text() const { + return menu_text; + } /// menu buttons - inline Buttons &buttons() { return menu_buttons; } + inline Buttons &buttons() { + return menu_buttons; + } /* -- mutators -------------------------------------------- */ @@ -110,13 +130,14 @@ public: private: std::string menu_label; std::string menu_text; - + Buttons menu_buttons; }; /// descriptions loader class -class Descriptions { +class Descriptions +{ public: /// read entity menus from ini file static bool load_entity_menus(core::Entity *entity, const std::string &menufilename); -- cgit v1.2.3