Labyrinth
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
traiteditbutton.hpp
1 //////////////////////////////
2 //
3 // File: swce/traiteditbutton.hpp
4 // Author: Maciej Kaminski
5 // E-mail: maciej.a.kaminski@gmail.com
6 // Website: maciejkaminski.pl
7 //
8 // File creation date: Oct 30 2012
9 // This file is part of Project Labyrinth
10 // This file is going to be released under terms of GNU GPL in near future
11 //
12 //////////////////////////////
13 
14 #ifndef __SWCE_TRAIT_ED_BTN_H_
15 #define __SWCE_TRAIT_ED_BTN_H_
16 #include "lxs/windowing/updownbutton.hpp"
17 namespace SWCE
18 {
19  //! edit traits (attributes and skills)
21  {
22  protected:
23  //! name of trait edited
24  std::string associated_trait_name;
25  //! pointer to associated character
27  //! label to be updated each use
29  //! text is reassembled each time, value is changed
30  void AssembleActualText();
31  // which trait representation is used? (SW/verbal/pips)
32  // static int trait_representation;
33  public:
34  // enum
35  // {
36  // SW,
37  // Verbal,
38  // Pips
39  // };
40  // //! SW, Verbal, Pips
41  // static void SetTraitRepresentation(int f);
42  //! constructor
44  {
45  //associated_trait_name=-1;
46  character=0;
47  pts_left=0;
48  }
49  //! set name of trait, edited w/ this button
50  void SetAssociatedTrait(const std::string & t)
51  {
52  associated_trait_name.assign(t);
54  }
55  void Refresh()
56  {
58  }
59  //! associate button with particular character
61  {
62  character=c;
64  }
65  //! label will be updated each time, trait is increased or decreased
67  {
68  pts_left=l;
70  }
71  void ValueUp()
72  {
75  }
76  void ValueDown()
77  {
80  }
81 };
82 }
83 #endif