2012-05-03 01:33:33 +00:00
|
|
|
#ifndef MWGUI_SCROLLWINDOW_H
|
|
|
|
#define MWGUI_SCROLLWINDOW_H
|
|
|
|
|
2013-04-10 04:32:05 +00:00
|
|
|
#include "windowbase.hpp"
|
2014-09-12 03:14:21 +00:00
|
|
|
|
2012-05-03 01:33:33 +00:00
|
|
|
#include "../mwworld/ptr.hpp"
|
|
|
|
|
2015-01-10 02:56:06 +00:00
|
|
|
namespace Gui
|
|
|
|
{
|
|
|
|
class ImageButton;
|
|
|
|
}
|
|
|
|
|
2012-05-03 01:33:33 +00:00
|
|
|
namespace MWGui
|
|
|
|
{
|
2019-04-01 17:47:12 +00:00
|
|
|
class ScrollWindow : public BookWindowBase
|
2012-05-03 01:33:33 +00:00
|
|
|
{
|
|
|
|
public:
|
2013-04-10 18:46:21 +00:00
|
|
|
ScrollWindow ();
|
2012-05-15 16:05:53 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void setPtr (const MWWorld::Ptr& scroll) override;
|
2013-02-17 14:56:22 +00:00
|
|
|
void setInventoryAllowed(bool allowed);
|
2012-05-03 03:26:05 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void onResChange(int, int) override { center(); }
|
2017-09-23 20:07:30 +00:00
|
|
|
|
2012-05-03 03:26:05 +00:00
|
|
|
protected:
|
|
|
|
void onCloseButtonClicked (MyGUI::Widget* _sender);
|
|
|
|
void onTakeButtonClicked (MyGUI::Widget* _sender);
|
2015-03-11 19:33:55 +00:00
|
|
|
void setTakeButtonShow(bool show);
|
2017-09-23 22:23:08 +00:00
|
|
|
void onKeyButtonPressed(MyGUI::Widget* sender, MyGUI::KeyCode key, MyGUI::Char character);
|
2012-05-03 03:26:05 +00:00
|
|
|
|
|
|
|
private:
|
2014-09-12 03:14:21 +00:00
|
|
|
Gui::ImageButton* mCloseButton;
|
|
|
|
Gui::ImageButton* mTakeButton;
|
2012-05-07 22:39:52 +00:00
|
|
|
MyGUI::ScrollView* mTextView;
|
2012-05-03 03:26:05 +00:00
|
|
|
|
|
|
|
MWWorld::Ptr mScroll;
|
2013-02-17 14:56:22 +00:00
|
|
|
|
|
|
|
bool mTakeButtonShow;
|
|
|
|
bool mTakeButtonAllowed;
|
|
|
|
|
2012-05-03 01:33:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|