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