You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3mp/apps/openmw/mwgui/tooltips.hpp

57 lines
1.4 KiB
C++

13 years ago
#ifndef MWGUI_TOOLTIPS_H
#define MWGUI_TOOLTIPS_H
#include <openengine/gui/layout.hpp>
#include "../mwworld/ptr.hpp"
13 years ago
namespace MWGui
{
13 years ago
class WindowManager;
13 years ago
class ToolTips : public OEngine::GUI::Layout
{
public:
13 years ago
ToolTips(WindowManager* windowManager);
13 years ago
void onFrame(float frameDuration);
void enterGameMode();
void enterGuiMode();
void setFocusObject(const MWWorld::Ptr& focus);
13 years ago
void adjustScreen(int screenWidth, int screenHeight);
private:
MyGUI::EditBox* mTextToolTip;
MyGUI::Widget* mTextToolTipBox;
MyGUI::Widget* mDynamicToolTipBox;
13 years ago
WindowManager* mWindowManager;
MWWorld::Ptr mFocusObject;
13 years ago
void findImageExtension(std::string& image);
MyGUI::IntSize getToolTipViaPtr ();
///< @return requested tooltip size
MyGUI::IntSize createImageToolTip(const std::string& caption, const std::string& image, const std::string& text);
///< @return requested tooltip size
MyGUI::IntSize createToolTip(const std::string& caption, const std::string& text);
///< @return requested tooltip size
std::string getValueString(const int value);
///< get "Value: X" string or "" if value is 0
std::string toString(const float value);
std::string toString(const int value);
13 years ago
bool mGameMode;
};
}
#endif