#include <GLWChannelText.h>

Public Member Functions | |
| GLWChannelText () | |
| virtual | ~GLWChannelText () |
| virtual void | channelsChanged (unsigned int id) |
| virtual void | itemSelected (GLWSelectorEntry *entry, int position) |
| virtual void | buttonDown (unsigned int id) |
| virtual void | draw () |
| virtual void | simulate (float frameTime) |
| virtual bool | initFromXML (XMLNode *node) |
| virtual void | mouseDown (int button, float x, float y, bool &skipRest) |
| virtual void | mouseUp (int button, float x, float y, bool &skipRest) |
| virtual void | mouseDrag (int button, float mx, float my, float x, float y, bool &skipRest) |
| virtual void | keyDown (char *buffer, unsigned int keyState, KeyboardHistory::HistoryElement *history, int hisCount, bool &skipRest) |
| virtual void | setParent (GLWPanel *parent) |
| virtual void | setX (float x) |
| virtual void | setY (float y) |
| virtual void | setW (float w) |
| virtual void | setH (float h) |
| REGISTER_CLASS_HEADER (GLWChannelText) | |
Protected Member Functions | |
| void | processNotVisibleKey (unsigned int unicode, unsigned int dik, bool &skipRest) |
| void | processVisibleKey (unsigned int unicode, unsigned int dik) |
| void | processSpecialText () |
| void | processNormalText () |
| bool | checkCurrentChannel () |
| bool | channelValid (const char *channelName) |
| void | setVisible (bool visible) |
| void | setChannelEntry (GLWChannelView::CurrentChannelEntry &entry) |
Protected Attributes | |
| GLTexture | buttonTexture_ |
| GLTexture | colorTexture_ |
| GLWChannelViewTextRenderer | prompt_ |
| GLWChannelView::CurrentChannelEntry | channelEntry_ |
| GLWIconButton | button_ |
| GLWChannelView | view_ |
| std::map < KeyboardKey *, std::string > | keys_ |
| LangString | text_ |
| float | fontSize_ |
| float | outlineFontSize_ |
| float | ctime_ |
| bool | cursor_ |
| bool | visible_ |
| bool | createdTexture_ |
| int | maxTextLen_ |
| unsigned int | whisperDest_ |
| LangString | whisperDestStr_ |
Static Protected Attributes | |
| static std::list < ChannelText > | lastMessages_ |
Definition at line 29 of file GLWChannelText.h.
| GLWChannelText::GLWChannelText | ( | ) |
Definition at line 45 of file GLWChannelText.cpp.
References button_, prompt_, GLWChannelViewTextRenderer::setChannelView(), GLWButton::setHandler(), GLWChannelView::setHandler(), GLWidget::setToolTip(), ToolTip::ToolTipAlignLeft, ToolTip::ToolTipHelp, and view_.
| GLWChannelText::~GLWChannelText | ( | ) | [virtual] |
Definition at line 61 of file GLWChannelText.cpp.
| void GLWChannelText::channelsChanged | ( | unsigned int | id | ) | [virtual] |
Implements GLWChannelViewI.
Definition at line 694 of file GLWChannelText.cpp.
References checkCurrentChannel().
| void GLWChannelText::itemSelected | ( | GLWSelectorEntry * | entry, | |
| int | position | |||
| ) | [virtual] |
Implements GLWSelectorI.
Definition at line 585 of file GLWChannelText.cpp.
References GLWChannelView::BaseChannelEntry::channel, channelEntry_, channelValid(), checkCurrentChannel(), GLWChannelView::CurrentChannelEntry::color, eChatSelectorStart, eColorSelectorStart, eJoinSelectorStart, eLeaveSelectorStart, eMuteSelectorStart, eReplySelectorStart, eResendSelectorStart, eSelectSelectorStart, eWhisperSelectorStart, GLWChannelView::getChannel(), GLWSelectorEntry::getColor(), GLWSelectorEntry::getDataText(), GLWChannelView::getLastWhisperSrc(), ChannelText::getMessage(), TankState::getMuted(), ClientChannelManager::getMutedPlayers(), Target::getPlayerId(), Tank::getState(), ScorchedContext::getTankContainer(), GLWSelectorEntry::getText(), GLWSelectorEntry::getUserData(), ClientChannelManager::instance(), ScorchedClient::instance(), int(), GLWChannelView::joinChannel(), lastMessages_, GLWChannelView::leaveChannel(), ClientChannelManager::sendText(), setChannelEntry(), TankState::setMuted(), setVisible(), text_, view_, visible_, and whisperDest_.
| void GLWChannelText::buttonDown | ( | unsigned int | id | ) | [virtual] |
Implements GLWButtonI.
Definition at line 420 of file GLWChannelText.cpp.
References GLWChannelView::BaseChannelEntry::channel, channelEntry_, channelValid(), checkCurrentChannel(), colorTexture_, eChatSelectorStart, eColorSelectorStart, eJoinSelectorStart, eLeaveSelectorStart, eMuteSelectorStart, ChannelDefinition::eReadOnlyChannel, eReplySelectorStart, eResendSelectorStart, eSelectSelectorStart, ChannelDefinition::eWhisperChannel, eWhisperSelectorStart, S3D::formatStringBuffer(), TankColorGenerator::getAllColors(), GLWChannelView::getAvailableChannels(), GLWSelectorEntry::getColor(), GLWChannelView::getCurrentChannels(), TankContainer::getCurrentTank(), Tank::getDestinationId(), ScorchedContext::getGameState(), ChannelText::getMessage(), GameState::getMouseX(), GameState::getMouseY(), TankState::getMuted(), GLWSelectorEntry::getPopups(), Tank::getState(), ScorchedContext::getTankContainer(), Target::getTargetName(), GLWSelectorEntry::getTextureWidth(), GLWChannelView::CurrentChannelEntry::id, GLWSelector::instance(), TankColorGenerator::instance(), ScorchedClient::instance(), LANG_RESOURCE, LANG_RESOURCE_3, LANG_STRING, lastMessages_, GLWSelectorEntry::setSeperator(), GLWSelector::showSelector(), ToolTip::ToolTipAlignBottom, ToolTip::ToolTipHelp, GLWChannelView::BaseChannelEntry::type, view_, and whisperDestStr_.
| void GLWChannelText::draw | ( | ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 80 of file GLWChannelText.cpp.
References GLWColors::black, GLState::BLEND_ON, button_, buttonTexture_, channelEntry_, GLWChannelView::CurrentChannelEntry::color, colorTexture_, GLTexture::create(), createdTexture_, GLWidget::draw(), GLWIconButton::draw(), GLWChannelView::draw(), GLWidget::drawRoundBox(), GLFont2d::drawWidthRhs(), fontSize_, S3D::getDataFile(), GLWFont::getGameFont(), GLWFont::getGameShadowFont(), GLWidget::getH(), GLWChannelView::getParentSized(), ChannelTextParser::getString(), GLWidget::getW(), GLFont2d::getWidth(), GL_LINE_LOOP, GL_TRIANGLE_FAN, glBegin(), glColor3f(), glColor4f(), glEnd(), glVertex2f(), GLWidget::h_, GLWFont::instance(), ImageFactory::loadAlphaImageHandle(), ImageFactory::loadImageHandle(), prompt_, setH(), GLWIconButton::setTexture(), setW(), text_, view_, visible_, GLWidget::w_, GLWidget::x_, and GLWidget::y_.
| void GLWChannelText::simulate | ( | float | frameTime | ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 65 of file GLWChannelText.cpp.
References button_, ctime_, cursor_, GLWButton::simulate(), GLWChannelView::simulate(), view_, and visible_.
| bool GLWChannelText::initFromXML | ( | XMLNode * | node | ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 795 of file GLWChannelText.cpp.
References GLWChannelView::BaseChannelEntry::channel, channelEntry_, Keyboard::getKey(), XMLNode::getNamedChild(), GLWidget::initFromXML(), GLWChannelView::initFromXMLInternal(), Keyboard::instance(), keys_, XMLNode::returnError(), and view_.
| void GLWChannelText::mouseDown | ( | int | button, | |
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 356 of file GLWChannelText.cpp.
References button_, GLWButton::mouseDown(), GLWChannelView::mouseDown(), and view_.
| void GLWChannelText::mouseUp | ( | int | button, | |
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 362 of file GLWChannelText.cpp.
References button_, GLWButton::mouseUp(), GLWChannelView::mouseUp(), and view_.
| void GLWChannelText::mouseDrag | ( | int | button, | |
| float | mx, | |||
| float | my, | |||
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 368 of file GLWChannelText.cpp.
References button_, GLWButton::mouseDrag(), GLWChannelView::mouseDrag(), and view_.
| void GLWChannelText::keyDown | ( | char * | buffer, | |
| unsigned int | keyState, | |||
| KeyboardHistory::HistoryElement * | history, | |||
| int | hisCount, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 154 of file GLWChannelText.cpp.
References GLWChannelView::keyDown(), processNotVisibleKey(), processVisibleKey(), KeyboardHistory::HistoryElement::representedUnicode, KeyboardHistory::HistoryElement::sdlKey, view_, and visible_.
| void GLWChannelText::setParent | ( | GLWPanel * | parent | ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 374 of file GLWChannelText.cpp.
References button_, GLWidget::setParent(), and view_.
| void GLWChannelText::setX | ( | float | x | ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 381 of file GLWChannelText.cpp.
References button_, GLWChannelView::setX(), GLWIconButton::setX(), GLWidget::setX(), and view_.
| void GLWChannelText::setY | ( | float | y | ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 388 of file GLWChannelText.cpp.
References button_, GLWChannelView::setY(), GLWIconButton::setY(), GLWidget::setY(), and view_.
| void GLWChannelText::setW | ( | float | w | ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 395 of file GLWChannelText.cpp.
References GLWidget::setW(), and view_.
Referenced by draw().
| void GLWChannelText::setH | ( | float | h | ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 401 of file GLWChannelText.cpp.
References GLWidget::setH(), and view_.
Referenced by draw().
| GLWChannelText::REGISTER_CLASS_HEADER | ( | GLWChannelText | ) |
| void GLWChannelText::processNotVisibleKey | ( | unsigned int | unicode, | |
| unsigned int | dik, | |||
| bool & | skipRest | |||
| ) | [protected] |
Definition at line 177 of file GLWChannelText.cpp.
References checkCurrentChannel(), GLWChannelView::getChannel(), KeyboardKey::getKeys(), KeyboardKey::KeyEntry::key, keys_, LANG_STRING, setChannelEntry(), setVisible(), text_, view_, and visible_.
Referenced by keyDown().
| void GLWChannelText::processVisibleKey | ( | unsigned int | unicode, | |
| unsigned int | dik | |||
| ) | [protected] |
Definition at line 223 of file GLWChannelText.cpp.
References ScorchedClient::instance(), maxTextLen_, processNormalText(), processSpecialText(), setVisible(), and text_.
Referenced by keyDown().
| void GLWChannelText::processSpecialText | ( | ) | [protected] |
Definition at line 304 of file GLWChannelText.cpp.
References GLWChannelView::BaseChannelEntry::channel, channelValid(), LangStringUtil::convertFromLang(), GLWChannelView::getChannel(), GLWChannelView::getLastWhisperSrc(), LANG_STRING, setChannelEntry(), text_, view_, and whisperDest_.
Referenced by processVisibleKey().
| void GLWChannelText::processNormalText | ( | ) | [protected] |
Definition at line 291 of file GLWChannelText.cpp.
References GLWChannelView::BaseChannelEntry::channel, channelEntry_, ChannelDefinition::eWhisperChannel, ClientChannelManager::instance(), lastMessages_, ClientChannelManager::sendText(), text_, GLWChannelView::BaseChannelEntry::type, and whisperDest_.
Referenced by processVisibleKey().
| bool GLWChannelText::checkCurrentChannel | ( | ) | [protected] |
Definition at line 739 of file GLWChannelText.cpp.
References GLWChannelView::BaseChannelEntry::channel, channelEntry_, channelValid(), GLWChannelView::getChannel(), GLWChannelView::getCurrentChannels(), setChannelEntry(), and view_.
Referenced by buttonDown(), channelsChanged(), itemSelected(), and processNotVisibleKey().
| bool GLWChannelText::channelValid | ( | const char * | channelName | ) | [protected] |
Definition at line 699 of file GLWChannelText.cpp.
References ChannelDefinition::eReadOnlyChannel, ChannelDefinition::eWhisperChannel, GLWChannelView::getChannel(), ScorchedContext::getTankContainer(), Target::getTargetName(), ScorchedClient::instance(), GLWChannelView::BaseChannelEntry::type, view_, whisperDest_, and whisperDestStr_.
Referenced by buttonDown(), checkCurrentChannel(), itemSelected(), and processSpecialText().
| void GLWChannelText::setVisible | ( | bool | visible | ) | [protected] |
Reimplemented from GLWidget.
Definition at line 279 of file GLWChannelText.cpp.
References MetaClass::getClassName(), GLWidget::getParent(), GLWWindowManager::instance(), GLWWindow::setWindowLevel(), GLWWindowManager::sortWindowLevels(), LangStringUtil::strcmp(), and visible_.
Referenced by itemSelected(), processNotVisibleKey(), and processVisibleKey().
| void GLWChannelText::setChannelEntry | ( | GLWChannelView::CurrentChannelEntry & | entry | ) | [protected] |
Definition at line 776 of file GLWChannelText.cpp.
References GLWChannelView::BaseChannelEntry::channel, channelEntry_, ChannelDefinition::eWhisperChannel, GLWChannelView::CurrentChannelEntry::id, ScorchedClient::instance(), LANG_PARAM_2, LANG_PARAM_3, ChannelTextParser::parseText(), prompt_, GLWChannelView::BaseChannelEntry::type, and whisperDestStr_.
Referenced by checkCurrentChannel(), itemSelected(), processNotVisibleKey(), and processSpecialText().
std::list< ChannelText > GLWChannelText::lastMessages_ [static, protected] |
Definition at line 66 of file GLWChannelText.h.
Referenced by buttonDown(), itemSelected(), and processNormalText().
GLTexture GLWChannelText::buttonTexture_ [protected] |
GLTexture GLWChannelText::colorTexture_ [protected] |
GLWChannelViewTextRenderer GLWChannelText::prompt_ [protected] |
Definition at line 68 of file GLWChannelText.h.
Referenced by draw(), GLWChannelText(), and setChannelEntry().
Definition at line 69 of file GLWChannelText.h.
Referenced by buttonDown(), checkCurrentChannel(), draw(), initFromXML(), itemSelected(), processNormalText(), and setChannelEntry().
GLWIconButton GLWChannelText::button_ [protected] |
Definition at line 70 of file GLWChannelText.h.
Referenced by draw(), GLWChannelText(), mouseDown(), mouseDrag(), mouseUp(), setParent(), setX(), setY(), and simulate().
GLWChannelView GLWChannelText::view_ [protected] |
Definition at line 71 of file GLWChannelText.h.
Referenced by buttonDown(), channelValid(), checkCurrentChannel(), draw(), GLWChannelText(), initFromXML(), itemSelected(), keyDown(), mouseDown(), mouseDrag(), mouseUp(), processNotVisibleKey(), processSpecialText(), setH(), setParent(), setW(), setX(), setY(), and simulate().
std::map<KeyboardKey *, std::string> GLWChannelText::keys_ [protected] |
Definition at line 72 of file GLWChannelText.h.
Referenced by initFromXML(), and processNotVisibleKey().
LangString GLWChannelText::text_ [protected] |
Definition at line 73 of file GLWChannelText.h.
Referenced by draw(), itemSelected(), processNormalText(), processNotVisibleKey(), processSpecialText(), and processVisibleKey().
float GLWChannelText::fontSize_ [protected] |
float GLWChannelText::outlineFontSize_ [protected] |
Definition at line 74 of file GLWChannelText.h.
float GLWChannelText::ctime_ [protected] |
bool GLWChannelText::cursor_ [protected] |
bool GLWChannelText::visible_ [protected] |
Reimplemented from GLWidget.
Definition at line 76 of file GLWChannelText.h.
Referenced by draw(), itemSelected(), keyDown(), processNotVisibleKey(), setVisible(), and simulate().
bool GLWChannelText::createdTexture_ [protected] |
int GLWChannelText::maxTextLen_ [protected] |
unsigned int GLWChannelText::whisperDest_ [protected] |
Definition at line 79 of file GLWChannelText.h.
Referenced by channelValid(), itemSelected(), processNormalText(), and processSpecialText().
LangString GLWChannelText::whisperDestStr_ [protected] |
Definition at line 80 of file GLWChannelText.h.
Referenced by buttonDown(), channelValid(), and setChannelEntry().
1.5.3