Last change
on this file since 6693 was
6633,
checked in by scheusso, 15 years ago
|
some adjustments (tabs to spaces, etc.)
|
-
Property svn:eol-style set to
native
|
File size:
1.3 KB
|
Rev | Line | |
---|
[6596] | 1 | #ifndef _ChatBox_h_ |
---|
| 2 | #define _ChatBox_h_ |
---|
| 3 | |
---|
| 4 | #include "CEGuiSample.h" |
---|
| 5 | #include "CEGUI/CEGUI.h" |
---|
| 6 | #include "CEGUI/CEGUIXMLAttributes.h" |
---|
| 7 | |
---|
[6597] | 8 | class ChatBox : public CEGuiSample |
---|
[6596] | 9 | { |
---|
[6597] | 10 | public: |
---|
[6633] | 11 | bool initialiseSample(); |
---|
| 12 | void cleanupSample(void); |
---|
| 13 | bool Event_HistorySizeChange(const CEGUI::EventArgs& args); |
---|
| 14 | bool Event_ChatTextAdded(const CEGUI::EventArgs& args); |
---|
| 15 | bool Event_FontChange(const CEGUI::EventArgs& args); |
---|
| 16 | void setHistorySize(const size_t& pSize); |
---|
| 17 | void addChatText(const CEGUI::String& pText); |
---|
| 18 | void registerFont(const CEGUI::String& pLogicalName, const CEGUI::String& pFileName); |
---|
[6596] | 19 | |
---|
[6597] | 20 | protected: |
---|
[6633] | 21 | CEGUI::Font* makeFont(const CEGUI::String& pFontName, const CEGUI::String& pFileName, const CEGUI::String& pSize); |
---|
| 22 | void changeFont(const CEGUI::String& pFontLogicalName, const CEGUI::String& pFontSize); |
---|
[6596] | 23 | |
---|
[6597] | 24 | private: |
---|
[6633] | 25 | // Type of list for registered fonts |
---|
| 26 | typedef std::map<CEGUI::String, CEGUI::String> FontList; |
---|
[6596] | 27 | |
---|
[6633] | 28 | // List of registered fonts |
---|
| 29 | FontList mFontList; |
---|
[6596] | 30 | |
---|
[6633] | 31 | // Maximal number of entries to retain within the Listbox |
---|
| 32 | size_t mHistorySize; |
---|
[6596] | 33 | |
---|
[6633] | 34 | // Logical font name dedicated to the chat box |
---|
| 35 | // This allows us to modify the properties of that font and not affect the fonts used elsewhere |
---|
| 36 | CEGUI::String mChatFontName; |
---|
[6596] | 37 | |
---|
[6633] | 38 | // Default font size |
---|
| 39 | CEGUI::String mDefaultFontSize; |
---|
[6596] | 40 | }; |
---|
[6633] | 41 | |
---|
| 42 | |
---|
| 43 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.