2013-11-05 18:50:24 +00:00
|
|
|
#ifndef OPENMW_MWGUI_SAVEGAMEDIALOG_H
|
|
|
|
#define OPENMW_MWGUI_SAVEGAMEDIALOG_H
|
|
|
|
|
|
|
|
#include "windowbase.hpp"
|
|
|
|
|
2013-11-21 19:24:58 +00:00
|
|
|
namespace MWState
|
|
|
|
{
|
|
|
|
class Character;
|
2014-04-28 18:57:45 +00:00
|
|
|
class Slot;
|
2013-11-21 19:24:58 +00:00
|
|
|
}
|
|
|
|
|
2013-11-05 18:50:24 +00:00
|
|
|
namespace MWGui
|
|
|
|
{
|
|
|
|
|
|
|
|
class SaveGameDialog : public MWGui::WindowModal
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SaveGameDialog();
|
|
|
|
|
|
|
|
virtual void open();
|
|
|
|
|
2014-05-27 07:00:31 +00:00
|
|
|
virtual void exit();
|
|
|
|
|
2013-11-05 18:50:24 +00:00
|
|
|
void setLoadOrSave(bool load);
|
|
|
|
|
2014-01-26 14:43:26 +00:00
|
|
|
private:
|
2014-06-10 00:27:38 +00:00
|
|
|
void confirmDeleteSave();
|
|
|
|
|
2014-08-17 18:41:23 +00:00
|
|
|
void onKeyButtonPressed(MyGUI::Widget* _sender, MyGUI::KeyCode key, MyGUI::Char character);
|
2013-11-05 18:50:24 +00:00
|
|
|
void onCancelButtonClicked (MyGUI::Widget* sender);
|
|
|
|
void onOkButtonClicked (MyGUI::Widget* sender);
|
2014-06-10 00:27:38 +00:00
|
|
|
void onDeleteButtonClicked (MyGUI::Widget* sender);
|
2013-11-21 19:24:58 +00:00
|
|
|
void onCharacterSelected (MyGUI::ComboBox* sender, size_t pos);
|
2014-04-28 18:57:45 +00:00
|
|
|
// Slot selected (mouse click or arrow keys)
|
2013-11-21 19:24:58 +00:00
|
|
|
void onSlotSelected (MyGUI::ListBox* sender, size_t pos);
|
2014-04-28 18:57:45 +00:00
|
|
|
// Slot activated (double click or enter key)
|
2014-01-25 21:30:25 +00:00
|
|
|
void onSlotActivated (MyGUI::ListBox* sender, size_t pos);
|
2014-04-28 18:57:45 +00:00
|
|
|
// Slot clicked with mouse
|
|
|
|
void onSlotMouseClick(MyGUI::ListBox* sender, size_t pos);
|
|
|
|
|
|
|
|
void onDeleteSlotConfirmed();
|
|
|
|
|
2014-01-26 14:22:31 +00:00
|
|
|
void onEditSelectAccept (MyGUI::EditBox* sender);
|
2014-01-26 14:43:26 +00:00
|
|
|
void onSaveNameChanged (MyGUI::EditBox* sender);
|
|
|
|
void onConfirmationGiven();
|
2013-11-21 19:24:58 +00:00
|
|
|
|
2014-01-26 14:43:26 +00:00
|
|
|
void accept(bool reallySure=false);
|
2013-11-05 18:50:24 +00:00
|
|
|
|
2014-01-26 14:43:26 +00:00
|
|
|
void fillSaveList();
|
2013-11-05 18:50:24 +00:00
|
|
|
|
|
|
|
MyGUI::ImageBox* mScreenshot;
|
2013-11-21 19:24:58 +00:00
|
|
|
bool mSaving;
|
2013-11-05 18:50:24 +00:00
|
|
|
|
|
|
|
MyGUI::ComboBox* mCharacterSelection;
|
|
|
|
MyGUI::EditBox* mInfoText;
|
|
|
|
MyGUI::Button* mOkButton;
|
|
|
|
MyGUI::Button* mCancelButton;
|
2014-06-10 00:27:38 +00:00
|
|
|
MyGUI::Button* mDeleteButton;
|
2013-11-05 18:50:24 +00:00
|
|
|
MyGUI::ListBox* mSaveList;
|
|
|
|
MyGUI::EditBox* mSaveNameEdit;
|
|
|
|
MyGUI::Widget* mSpacer;
|
|
|
|
|
2013-11-21 19:24:58 +00:00
|
|
|
const MWState::Character* mCurrentCharacter;
|
2014-04-28 18:57:45 +00:00
|
|
|
const MWState::Slot* mCurrentSlot;
|
2013-11-21 19:24:58 +00:00
|
|
|
|
2013-11-05 18:50:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|