Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/descriptions.h')
-rw-r--r--src/core/descriptions.h55
1 files changed, 38 insertions, 17 deletions
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 <list>
#include <iostream>
-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);