1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 22:19:54 +00:00
openmw-tes3mp/apps/openmw/mwgui/tooltips.hpp
2012-04-15 21:14:14 +02:00

56 lines
1.4 KiB
C++

#ifndef MWGUI_TOOLTIPS_H
#define MWGUI_TOOLTIPS_H
#include <openengine/gui/layout.hpp>
#include "../mwworld/ptr.hpp"
namespace MWGui
{
class WindowManager;
class ToolTips : public OEngine::GUI::Layout
{
public:
ToolTips(WindowManager* windowManager);
void onFrame(float frameDuration);
void enterGameMode();
void enterGuiMode();
void setFocusObject(const MWWorld::Ptr& focus);
void adjustScreen(int screenWidth, int screenHeight);
private:
MyGUI::EditBox* mTextToolTip;
MyGUI::Widget* mTextToolTipBox;
MyGUI::Widget* mDynamicToolTipBox;
WindowManager* mWindowManager;
MWWorld::Ptr mFocusObject;
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);
bool mGameMode;
};
}
#endif