2012-05-15 12:51:51 +02:00
|
|
|
#ifndef MWGUI_COUNTDIALOG_H
|
|
|
|
#define MWGUI_COUNTDIALOG_H
|
|
|
|
|
2013-04-10 00:32:05 -04:00
|
|
|
#include "windowbase.hpp"
|
2012-05-15 12:51:51 +02:00
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
{
|
2012-08-26 10:52:06 +02:00
|
|
|
class CountDialog : public WindowModal
|
2012-05-15 12:51:51 +02:00
|
|
|
{
|
|
|
|
public:
|
2013-04-10 14:46:21 -04:00
|
|
|
CountDialog();
|
2012-05-18 17:58:33 +02:00
|
|
|
void open(const std::string& item, const std::string& message, const int maxCount);
|
2013-07-29 18:27:00 +02:00
|
|
|
void cancel();
|
2012-05-15 12:51:51 +02:00
|
|
|
|
|
|
|
typedef MyGUI::delegates::CMultiDelegate2<MyGUI::Widget*, int> EventHandle_WidgetInt;
|
|
|
|
|
|
|
|
/** Event : Ok button was clicked.\n
|
|
|
|
signature : void method(MyGUI::Widget* _sender, int _count)\n
|
|
|
|
*/
|
|
|
|
EventHandle_WidgetInt eventOkClicked;
|
|
|
|
|
|
|
|
private:
|
|
|
|
MyGUI::ScrollBar* mSlider;
|
|
|
|
MyGUI::EditBox* mItemEdit;
|
|
|
|
MyGUI::TextBox* mItemText;
|
|
|
|
MyGUI::TextBox* mLabelText;
|
|
|
|
MyGUI::Button* mOkButton;
|
|
|
|
MyGUI::Button* mCancelButton;
|
2013-07-29 18:27:00 +02:00
|
|
|
|
2012-05-15 12:51:51 +02:00
|
|
|
void onCancelButtonClicked(MyGUI::Widget* _sender);
|
|
|
|
void onOkButtonClicked(MyGUI::Widget* _sender);
|
|
|
|
void onEditTextChange(MyGUI::EditBox* _sender);
|
|
|
|
void onSliderMoved(MyGUI::ScrollBar* _sender, size_t _position);
|
2013-05-16 14:05:22 -04:00
|
|
|
void onEnterKeyPressed(MyGUI::EditBox* _sender);
|
2012-05-15 12:51:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|