1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-05 15:55:45 +00:00
OpenMW/apps/openmw/mwgui/bookwindow.hpp

58 lines
1.5 KiB
C++
Raw Normal View History

2012-05-03 01:33:33 +00:00
#ifndef MWGUI_BOOKWINDOW_H
#define MWGUI_BOOKWINDOW_H
#include "windowbase.hpp"
2012-05-03 01:33:33 +00:00
#include "../mwworld/ptr.hpp"
#include "imagebutton.hpp"
2012-05-03 01:33:33 +00:00
namespace MWGui
{
class BookWindow : public WindowBase
{
public:
BookWindow();
virtual void exit();
2012-05-03 01:33:33 +00:00
void open(MWWorld::Ptr book);
void setTakeButtonShow(bool show);
2013-06-13 05:50:07 +00:00
void nextPage();
void prevPage();
void setInventoryAllowed(bool allowed);
protected:
void onNextPageButtonClicked (MyGUI::Widget* sender);
void onPrevPageButtonClicked (MyGUI::Widget* sender);
void onCloseButtonClicked (MyGUI::Widget* sender);
void onTakeButtonClicked (MyGUI::Widget* sender);
void onMouseWheel(MyGUI::Widget* _sender, int _rel);
2012-05-10 09:03:27 +00:00
void updatePages();
void clearPages();
2013-05-08 11:55:15 +00:00
void adjustButton(MWGui::ImageButton* button);
2012-05-10 09:03:27 +00:00
private:
MWGui::ImageButton* mCloseButton;
MWGui::ImageButton* mTakeButton;
MWGui::ImageButton* mNextPageButton;
MWGui::ImageButton* mPrevPageButton;
2012-05-10 09:03:27 +00:00
MyGUI::TextBox* mLeftPageNumber;
MyGUI::TextBox* mRightPageNumber;
MyGUI::Widget* mLeftPage;
MyGUI::Widget* mRightPage;
unsigned int mCurrentPage; // 0 is first page
std::vector<MyGUI::Widget*> mPages;
MWWorld::Ptr mBook;
bool mTakeButtonShow;
bool mTakeButtonAllowed;
2012-05-03 01:33:33 +00:00
};
}
#endif