#include <GLWToolTip.h>

Public Member Functions | |
| bool | addToolTip (ToolTip::ToolTipType type, const LangString &title, const LangString &text, float x, float y, float w, float h) |
| bool | addToolTip (ToolTip *tip, float x, float y, float w, float h) |
| void | clearToolTip (float x, float y, float w, float h) |
| virtual void | simulate (const unsigned state, float frameTime) |
| virtual void | draw (const unsigned state) |
Static Public Member Functions | |
| static GLWToolTip * | instance () |
Protected Member Functions | |
| void | setupTip (ToolTip *tip) |
| void | calculateTip (ToolTip *tip) |
Protected Attributes | |
| ToolTip * | currentTip_ |
| ToolTip * | lastTip_ |
| float | timeDrawn_ |
| float | timeSeen_ |
| float | refreshTime_ |
| float | currentX_ |
| float | currentY_ |
| float | currentW_ |
| float | currentH_ |
| float | tipX_ |
| float | tipY_ |
| float | tipW_ |
| float | tipH_ |
| float | tipOffX_ |
| float | tipOffY_ |
| float | tipTextWidth_ |
| float | tipTextHeight_ |
| LangString | tipTitle_ |
| LangString | tipText_ |
| std::list< LangString > | tipTexts_ |
Static Protected Attributes | |
| static GLWToolTip * | instance_ = 0 |
Private Member Functions | |
| GLWToolTip () | |
| virtual | ~GLWToolTip () |
Definition at line 28 of file GLWToolTip.h.
| GLWToolTip::GLWToolTip | ( | ) | [private] |
Definition at line 45 of file GLWToolTip.cpp.
| GLWToolTip::~GLWToolTip | ( | ) | [private, virtual] |
Definition at line 56 of file GLWToolTip.cpp.
| GLWToolTip * GLWToolTip::instance | ( | ) | [static] |
Definition at line 36 of file GLWToolTip.cpp.
References instance_.
Referenced by ScoreDialog::addLine(), ClientState::addStandardComponents(), GLWTankViewer::draw(), GLWTankModel::draw(), GLWSelectorPart::draw(), GLWidget::draw(), GLMenu::draw(), SettingsSubSelectDialogListItem::draw(), ScoreDialog::draw(), GLWIconListSaveItem::draw(), GLWIconListSubModItem::draw(), GLWIconListModItem::draw(), ConsoleImpl::drawBackdrop(), GLWChannelViewTextRenderer::drawCharacter(), NetworkSelectDialog::drawColumnGames(), NetworkSelectDialog::drawIcon(), GLWWindow::drawMaximizedWindow(), GLWPlanView::drawTanks(), TargetRendererImplTarget::render2D(), TargetRendererImplTank::render2D(), and ClientState::setupGameState().
| bool GLWToolTip::addToolTip | ( | ToolTip::ToolTipType | type, | |
| const LangString & | title, | |||
| const LangString & | text, | |||
| float | x, | |||
| float | y, | |||
| float | w, | |||
| float | h | |||
| ) |
Definition at line 60 of file GLWToolTip.cpp.
References currentH_, currentTip_, currentW_, currentX_, currentY_, ScorchedContext::getGameState(), GameState::getMouseX(), GameState::getMouseY(), ScorchedClient::instance(), OptionsDisplay::instance(), ToolTip::setText(), ToolTip::ToolTipHelp, and ToolTip::ToolTipInfo.
Referenced by ScoreDialog::addLine(), GLWTankModel::draw(), GLWSelectorPart::draw(), GLWidget::draw(), GLMenu::draw(), SettingsSubSelectDialogListItem::draw(), ScoreDialog::draw(), GLWIconListSaveItem::draw(), GLWIconListSubModItem::draw(), GLWIconListModItem::draw(), GLWChannelViewTextRenderer::drawCharacter(), NetworkSelectDialog::drawColumnGames(), GLWWindow::drawMaximizedWindow(), GLWPlanView::drawTanks(), TargetRendererImplTarget::render2D(), and TargetRendererImplTank::render2D().
| bool GLWToolTip::addToolTip | ( | ToolTip * | tip, | |
| float | x, | |||
| float | y, | |||
| float | w, | |||
| float | h | |||
| ) |
Definition at line 90 of file GLWToolTip.cpp.
References currentH_, currentTip_, currentW_, currentX_, currentY_, ScorchedContext::getGameState(), GameState::getMouseX(), GameState::getMouseY(), OptionsDisplay::getShowContextHelp(), ToolTip::getType(), ScorchedClient::instance(), OptionsDisplay::instance(), ToolTip::ToolTipHelp, and ToolTip::ToolTipInfo.
| void GLWToolTip::clearToolTip | ( | float | x, | |
| float | y, | |||
| float | w, | |||
| float | h | |||
| ) |
Definition at line 157 of file GLWToolTip.cpp.
References currentTip_, ScorchedContext::getGameState(), GameState::getMouseX(), GameState::getMouseY(), and ScorchedClient::instance().
Referenced by GLWSelectorPart::draw(), GLWidget::draw(), and ConsoleImpl::drawBackdrop().
| void GLWToolTip::simulate | ( | const unsigned | state, | |
| float | frameTime | |||
| ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 169 of file GLWToolTip.cpp.
References timeDrawn_.
| void GLWToolTip::draw | ( | const unsigned | state | ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 174 of file GLWToolTip.cpp.
References GLState::BLEND_ON, calculateTip(), currentH_, currentTip_, currentW_, currentX_, currentY_, GLState::DEPTH_OFF, GLFont2d::drawA(), GLWidget::drawRoundBox(), GLWFont::getGameFont(), GLViewPort::getHeight(), ToolTip::getType(), GLViewPort::getWidth(), GL_LINE_LOOP, GL_LINE_SMOOTH, GL_TRIANGLE_FAN, glBegin(), glColor4f(), glDisable(), glEnable(), glEnd(), glLineWidth(), glVertex2f(), GLWFont::instance(), OptionsDisplay::instance(), lastTip_, ToolTip::populate(), refreshTime_, selectedColor, setupTip(), GLState::TEXTURE_OFF, timeDrawn_, timeSeen_, tipH_, tipOffX_, tipOffY_, tipTextHeight_, tipTexts_, tipTextWidth_, tipTitle_, tipW_, tipX_, tipY_, ToolTip::ToolTipAlignBottom, and ToolTip::ToolTipAlignLeft.
| void GLWToolTip::setupTip | ( | ToolTip * | tip | ) | [protected] |
Definition at line 115 of file GLWToolTip.cpp.
References currentTip_, ToolTip::getText(), ToolTip::getTitle(), tipText_, tipTextHeight_, tipTexts_, tipTextWidth_, and tipTitle_.
Referenced by draw().
| void GLWToolTip::calculateTip | ( | ToolTip * | tip | ) | [protected] |
Definition at line 125 of file GLWToolTip.cpp.
References GLWFont::instance(), LANG_STRING, tipText_, tipTextHeight_, tipTexts_, tipTextWidth_, and tipTitle_.
Referenced by draw().
GLWToolTip * GLWToolTip::instance_ = 0 [static, protected] |
ToolTip* GLWToolTip::currentTip_ [protected] |
Definition at line 46 of file GLWToolTip.h.
Referenced by addToolTip(), clearToolTip(), draw(), and setupTip().
ToolTip* GLWToolTip::lastTip_ [protected] |
float GLWToolTip::timeDrawn_ [protected] |
float GLWToolTip::timeSeen_ [protected] |
float GLWToolTip::refreshTime_ [protected] |
float GLWToolTip::currentX_ [protected] |
float GLWToolTip::currentY_ [protected] |
float GLWToolTip::currentW_ [protected] |
float GLWToolTip::currentH_ [protected] |
float GLWToolTip::tipX_ [protected] |
float GLWToolTip::tipY_ [protected] |
float GLWToolTip::tipW_ [protected] |
float GLWToolTip::tipH_ [protected] |
float GLWToolTip::tipOffX_ [protected] |
float GLWToolTip::tipOffY_ [protected] |
float GLWToolTip::tipTextWidth_ [protected] |
float GLWToolTip::tipTextHeight_ [protected] |
LangString GLWToolTip::tipTitle_ [protected] |
LangString GLWToolTip::tipText_ [protected] |
std::list<LangString> GLWToolTip::tipTexts_ [protected] |
1.5.3