Last change
on this file since 6634 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
|
Line | |
---|
1 | #ifndef _ChatBox_h_ |
---|
2 | #define _ChatBox_h_ |
---|
3 | |
---|
4 | #include "CEGuiSample.h" |
---|
5 | #include "CEGUI/CEGUI.h" |
---|
6 | #include "CEGUI/CEGUIXMLAttributes.h" |
---|
7 | |
---|
8 | class ChatBox : public CEGuiSample |
---|
9 | { |
---|
10 | public: |
---|
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); |
---|
19 | |
---|
20 | protected: |
---|
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); |
---|
23 | |
---|
24 | private: |
---|
25 | // Type of list for registered fonts |
---|
26 | typedef std::map<CEGUI::String, CEGUI::String> FontList; |
---|
27 | |
---|
28 | // List of registered fonts |
---|
29 | FontList mFontList; |
---|
30 | |
---|
31 | // Maximal number of entries to retain within the Listbox |
---|
32 | size_t mHistorySize; |
---|
33 | |
---|
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; |
---|
37 | |
---|
38 | // Default font size |
---|
39 | CEGUI::String mDefaultFontSize; |
---|
40 | }; |
---|
41 | |
---|
42 | |
---|
43 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.