OpenMW
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
MWGui::ToolTips Class Reference

#include <tooltips.hpp>

List of all members.

Public Member Functions

 ToolTips ()
void onFrame (float frameDuration)
void setEnabled (bool enabled)
void toggleFullHelp ()
 show extra info in item tooltips (owner, script)
bool getFullHelp () const
void setDelay (float delay)
void setFocusObject (const MWWorld::Ptr &focus)
void setFocusObjectScreenCoords (float min_x, float min_y, float max_x, float max_y)
 set the screen-space position of the tooltip for focused object

Static Public Member Functions

static std::string getValueString (const int value, const std::string &prefix)
static std::string getMiscString (const std::string &text, const std::string &prefix)
static std::string toString (const float value)
static std::string toString (const int value)
static std::string getCountString (const int value)
static void createSkillToolTip (MyGUI::Widget *widget, int skillId)
static void createAttributeToolTip (MyGUI::Widget *widget, int attributeId)
static void createSpecializationToolTip (MyGUI::Widget *widget, const std::string &name, int specId)
static void createBirthsignToolTip (MyGUI::Widget *widget, const std::string &birthsignId)
static void createRaceToolTip (MyGUI::Widget *widget, const ESM::Race *playerRace)
static void createClassToolTip (MyGUI::Widget *widget, const ESM::Class &playerClass)
static void createMagicEffectToolTip (MyGUI::Widget *widget, short id)

Private Member Functions

void findImageExtension (std::string &image)
MyGUI::IntSize getToolTipViaPtr (bool image=true)
MyGUI::IntSize createToolTip (const ToolTipInfo &info)
void position (MyGUI::IntPoint &position, MyGUI::IntSize size, MyGUI::IntSize viewportSize)
 Adjust position for a tooltip so that it doesn't leave the screen and does not obscure the mouse cursor.

Private Attributes

MyGUI::Widget * mDynamicToolTipBox
MWWorld::Ptr mFocusObject
float mFocusToolTipX
float mFocusToolTipY
int mHorizontalScrollIndex
float mDelay
float mRemainingDelay
int mLastMouseX
int mLastMouseY
bool mEnabled
bool mFullHelp

Constructor & Destructor Documentation


Member Function Documentation

void MWGui::ToolTips::createAttributeToolTip ( MyGUI::Widget *  widget,
int  attributeId 
) [static]
void MWGui::ToolTips::createBirthsignToolTip ( MyGUI::Widget *  widget,
const std::string &  birthsignId 
) [static]
void MWGui::ToolTips::createClassToolTip ( MyGUI::Widget *  widget,
const ESM::Class playerClass 
) [static]
void MWGui::ToolTips::createMagicEffectToolTip ( MyGUI::Widget *  widget,
short  id 
) [static]
void MWGui::ToolTips::createRaceToolTip ( MyGUI::Widget *  widget,
const ESM::Race playerRace 
) [static]
void MWGui::ToolTips::createSkillToolTip ( MyGUI::Widget *  widget,
int  skillId 
) [static]
void MWGui::ToolTips::createSpecializationToolTip ( MyGUI::Widget *  widget,
const std::string &  name,
int  specId 
) [static]
MyGUI::IntSize MWGui::ToolTips::createToolTip ( const ToolTipInfo info) [private]
Returns:
requested tooltip size
void MWGui::ToolTips::findImageExtension ( std::string &  image) [private]
std::string MWGui::ToolTips::getCountString ( const int  value) [static]
Returns:
blank string if count is 1, or else " (value)"
std::string MWGui::ToolTips::getMiscString ( const std::string &  text,
const std::string &  prefix 
) [static]
Returns:
"prefix: text" or "" if text is empty
MyGUI::IntSize MWGui::ToolTips::getToolTipViaPtr ( bool  image = true) [private]
Returns:
requested tooltip size
std::string MWGui::ToolTips::getValueString ( const int  value,
const std::string &  prefix 
) [static]
Returns:
"prefix: value" or "" if value is 0
void MWGui::ToolTips::onFrame ( float  frameDuration)
void MWGui::ToolTips::position ( MyGUI::IntPoint &  position,
MyGUI::IntSize  size,
MyGUI::IntSize  viewportSize 
) [private]

Adjust position for a tooltip so that it doesn't leave the screen and does not obscure the mouse cursor.

void MWGui::ToolTips::setDelay ( float  delay)
void MWGui::ToolTips::setEnabled ( bool  enabled)
void MWGui::ToolTips::setFocusObjectScreenCoords ( float  min_x,
float  min_y,
float  max_x,
float  max_y 
)

set the screen-space position of the tooltip for focused object

show extra info in item tooltips (owner, script)

std::string MWGui::ToolTips::toString ( const float  value) [static]
std::string MWGui::ToolTips::toString ( const int  value) [static]

Member Data Documentation

float MWGui::ToolTips::mDelay [private]
MyGUI::Widget* MWGui::ToolTips::mDynamicToolTipBox [private]
bool MWGui::ToolTips::mEnabled [private]

The documentation for this class was generated from the following files: