2012-08-12 16:11:09 +00:00
|
|
|
#ifndef GAME_MWBASE_WINDOWMANAGER_H
|
|
|
|
#define GAME_MWBASE_WINDOWMANAGER_H
|
|
|
|
|
2015-02-09 15:37:20 +00:00
|
|
|
#include <stdint.h>
|
2012-08-12 16:11:09 +00:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include <map>
|
2015-02-09 15:23:41 +00:00
|
|
|
#include <set>
|
2012-08-12 16:11:09 +00:00
|
|
|
|
2017-09-22 14:52:39 +00:00
|
|
|
#include <MyGUI_KeyCode.h>
|
|
|
|
|
2012-08-12 16:11:09 +00:00
|
|
|
#include "../mwgui/mode.hpp"
|
|
|
|
|
2020-04-16 13:31:20 +00:00
|
|
|
#include <components/sdlutil/events.hpp>
|
|
|
|
|
2015-01-31 22:27:34 +00:00
|
|
|
namespace Loading
|
|
|
|
{
|
|
|
|
class Listener;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Translation
|
|
|
|
{
|
|
|
|
class Storage;
|
|
|
|
}
|
|
|
|
|
2012-08-12 16:11:09 +00:00
|
|
|
namespace MyGUI
|
|
|
|
{
|
|
|
|
class Gui;
|
|
|
|
class Widget;
|
|
|
|
class UString;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
2014-01-25 17:20:17 +00:00
|
|
|
class ESMReader;
|
|
|
|
class ESMWriter;
|
2015-01-31 16:50:19 +00:00
|
|
|
struct CellId;
|
2012-08-12 16:11:09 +00:00
|
|
|
}
|
|
|
|
|
2015-02-09 15:23:41 +00:00
|
|
|
namespace MWMechanics
|
|
|
|
{
|
|
|
|
class AttributeValue;
|
|
|
|
template<typename T>
|
|
|
|
class DynamicStat;
|
|
|
|
class SkillValue;
|
|
|
|
}
|
|
|
|
|
2012-08-12 16:11:09 +00:00
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
class CellStore;
|
|
|
|
class Ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
{
|
2015-05-01 00:09:57 +00:00
|
|
|
class Layout;
|
2020-03-10 21:39:11 +00:00
|
|
|
class DragAndDrop;
|
2012-08-12 16:11:09 +00:00
|
|
|
class Console;
|
|
|
|
class SpellWindow;
|
|
|
|
class TradeWindow;
|
2012-09-26 16:30:47 +00:00
|
|
|
class TravelWindow;
|
2012-09-09 18:10:07 +00:00
|
|
|
class SpellBuyingWindow;
|
2012-08-12 16:11:09 +00:00
|
|
|
class ConfirmationDialog;
|
|
|
|
class CountDialog;
|
|
|
|
class ScrollWindow;
|
|
|
|
class BookWindow;
|
|
|
|
class InventoryWindow;
|
|
|
|
class ContainerWindow;
|
|
|
|
class DialogueWindow;
|
2014-05-27 07:00:31 +00:00
|
|
|
class WindowModal;
|
2015-02-07 03:05:28 +00:00
|
|
|
class JailScreen;
|
2014-02-11 17:26:57 +00:00
|
|
|
|
|
|
|
enum ShowInDialogueMode {
|
|
|
|
ShowInDialogueMode_IfPossible,
|
|
|
|
ShowInDialogueMode_Only,
|
|
|
|
ShowInDialogueMode_Never
|
|
|
|
};
|
2017-07-24 11:25:01 +00:00
|
|
|
|
|
|
|
struct TextColours;
|
2012-08-12 16:11:09 +00:00
|
|
|
}
|
|
|
|
|
2013-01-11 12:27:59 +00:00
|
|
|
namespace SFO
|
|
|
|
{
|
2013-01-12 15:57:29 +00:00
|
|
|
class CursorManager;
|
2013-01-11 12:27:59 +00:00
|
|
|
}
|
|
|
|
|
2012-08-12 16:11:09 +00:00
|
|
|
namespace MWBase
|
|
|
|
{
|
|
|
|
/// \brief Interface for widnow manager (implemented in MWGui)
|
2020-04-16 13:31:20 +00:00
|
|
|
class WindowManager : public SDLUtil::WindowListener
|
2012-08-12 16:11:09 +00:00
|
|
|
{
|
|
|
|
WindowManager (const WindowManager&);
|
|
|
|
///< not implemented
|
|
|
|
|
|
|
|
WindowManager& operator= (const WindowManager&);
|
|
|
|
///< not implemented
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
typedef std::vector<int> SkillList;
|
|
|
|
|
|
|
|
WindowManager() {}
|
|
|
|
|
|
|
|
virtual ~WindowManager() {}
|
|
|
|
|
2014-03-27 18:10:15 +00:00
|
|
|
/// @note This method will block until the video finishes playing
|
|
|
|
/// (and will continually update the window while doing so)
|
|
|
|
virtual void playVideo(const std::string& name, bool allowSkipping) = 0;
|
2020-11-14 18:13:16 +00:00
|
|
|
virtual bool isPlayingVideo(void) const = 0;
|
2014-03-27 18:10:15 +00:00
|
|
|
|
2013-05-15 15:54:18 +00:00
|
|
|
virtual void setNewGame(bool newgame) = 0;
|
|
|
|
|
2017-09-22 19:26:41 +00:00
|
|
|
virtual void pushGuiMode (MWGui::GuiMode mode, const MWWorld::Ptr& arg) = 0;
|
2012-08-12 16:11:09 +00:00
|
|
|
virtual void pushGuiMode (MWGui::GuiMode mode) = 0;
|
2017-09-22 22:00:40 +00:00
|
|
|
virtual void popGuiMode(bool noSound=false) = 0;
|
2012-08-12 16:11:09 +00:00
|
|
|
|
2017-09-22 22:00:40 +00:00
|
|
|
virtual void removeGuiMode (MWGui::GuiMode mode, bool noSound=false) = 0;
|
2012-08-12 16:11:09 +00:00
|
|
|
///< can be anywhere in the stack
|
|
|
|
|
2015-02-07 03:05:28 +00:00
|
|
|
virtual void goToJail(int days) = 0;
|
|
|
|
|
2013-05-15 15:54:18 +00:00
|
|
|
virtual void updatePlayer() = 0;
|
|
|
|
|
2012-08-12 16:11:09 +00:00
|
|
|
virtual MWGui::GuiMode getMode() const = 0;
|
2013-01-09 10:09:47 +00:00
|
|
|
virtual bool containsMode(MWGui::GuiMode) const = 0;
|
2012-08-12 16:11:09 +00:00
|
|
|
|
|
|
|
virtual bool isGuiMode() const = 0;
|
|
|
|
|
2013-03-18 20:33:12 +00:00
|
|
|
virtual bool isConsoleMode() const = 0;
|
|
|
|
|
2012-08-12 16:11:09 +00:00
|
|
|
virtual void toggleVisible (MWGui::GuiWindow wnd) = 0;
|
|
|
|
|
2013-08-05 21:15:26 +00:00
|
|
|
virtual void forceHide(MWGui::GuiWindow wnd) = 0;
|
|
|
|
virtual void unsetForceHide(MWGui::GuiWindow wnd) = 0;
|
|
|
|
|
2012-08-12 16:11:09 +00:00
|
|
|
/// Disallow all inventory mode windows
|
|
|
|
virtual void disallowAll() = 0;
|
|
|
|
|
|
|
|
/// Allow one or more windows
|
|
|
|
virtual void allow (MWGui::GuiWindow wnd) = 0;
|
|
|
|
|
|
|
|
virtual bool isAllowed (MWGui::GuiWindow wnd) const = 0;
|
|
|
|
|
|
|
|
/// \todo investigate, if we really need to expose every single lousy UI element to the outside world
|
|
|
|
virtual MWGui::InventoryWindow* getInventoryWindow() = 0;
|
|
|
|
virtual MWGui::CountDialog* getCountDialog() = 0;
|
|
|
|
virtual MWGui::ConfirmationDialog* getConfirmationDialog() = 0;
|
|
|
|
virtual MWGui::TradeWindow* getTradeWindow() = 0;
|
2015-03-11 19:04:25 +00:00
|
|
|
|
2018-03-24 07:00:15 +00:00
|
|
|
/*
|
|
|
|
Start of tes3mp addition
|
|
|
|
|
|
|
|
Make it possible to get the ContainerWindow from elsewhere
|
|
|
|
in the code
|
|
|
|
*/
|
|
|
|
virtual MWGui::ContainerWindow* getContainerWindow() = 0;
|
|
|
|
/*
|
|
|
|
End of tes3mp addition
|
|
|
|
*/
|
|
|
|
|
2020-10-26 17:48:40 +00:00
|
|
|
/*
|
|
|
|
Start of tes3mp addition
|
|
|
|
|
|
|
|
Make it possible to get the DialogueWindow from elsewhere
|
|
|
|
*/
|
|
|
|
virtual MWGui::DialogueWindow* getDialogueWindow() = 0;
|
|
|
|
/*
|
|
|
|
End of tes3mp addition
|
|
|
|
*/
|
|
|
|
|
2015-09-07 19:32:28 +00:00
|
|
|
/// Make the player use an item, while updating GUI state accordingly
|
2018-07-09 15:31:40 +00:00
|
|
|
virtual void useItem(const MWWorld::Ptr& item, bool force=false) = 0;
|
2015-09-07 19:32:28 +00:00
|
|
|
|
2015-03-11 19:04:25 +00:00
|
|
|
virtual void updateSpellWindow() = 0;
|
|
|
|
|
|
|
|
virtual void setConsoleSelectedObject(const MWWorld::Ptr& object) = 0;
|
2012-08-12 16:11:09 +00:00
|
|
|
|
2017-12-26 13:04:28 +00:00
|
|
|
/*
|
|
|
|
Start of tes3mp addition
|
|
|
|
|
|
|
|
Allow the direct setting of a console's Ptr, without the assumption that an object
|
|
|
|
was clicked and that key focus should be restored to the console window, for console
|
|
|
|
commands executed via server scripts
|
|
|
|
*/
|
|
|
|
virtual void setConsolePtr(const MWWorld::Ptr& object) = 0;
|
|
|
|
/*
|
|
|
|
End of tes3mp addition
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
Start of tes3mp addition
|
|
|
|
|
|
|
|
Allow the clearing of the console's Ptr from elsewhere in the code, so that
|
|
|
|
Ptrs used in console commands run from server scripts do not stay selected
|
|
|
|
*/
|
|
|
|
virtual void clearConsolePtr() = 0;
|
|
|
|
/*
|
|
|
|
End of tes3mp addition
|
|
|
|
*/
|
|
|
|
|
2013-08-07 13:34:11 +00:00
|
|
|
/// Set time left for the player to start drowning (update the drowning bar)
|
2014-04-27 02:27:26 +00:00
|
|
|
/// @param time time left to start drowning
|
|
|
|
/// @param maxTime how long we can be underwater (in total) until drowning starts
|
|
|
|
virtual void setDrowningTimeLeft (float time, float maxTime) = 0;
|
2013-08-07 13:34:11 +00:00
|
|
|
|
2016-02-04 23:39:52 +00:00
|
|
|
virtual void changeCell(const MWWorld::CellStore* cell) = 0;
|
2012-08-12 16:11:09 +00:00
|
|
|
///< change the active cell
|
|
|
|
|
2017-07-03 06:28:27 +00:00
|
|
|
/*
|
|
|
|
Start of tes3mp addition
|
|
|
|
|
2018-05-08 02:57:04 +00:00
|
|
|
Allow the setting of the image data for a global map tile from elsewhere
|
|
|
|
in the code
|
2017-07-03 06:28:27 +00:00
|
|
|
*/
|
2018-05-08 02:57:04 +00:00
|
|
|
virtual void setGlobalMapImage(int cellX, int cellY, const std::vector<char>& imageData) = 0;
|
2017-07-03 06:28:27 +00:00
|
|
|
/*
|
|
|
|
End of tes3mp addition
|
|
|
|
*/
|
|
|
|
|
2012-08-12 16:11:09 +00:00
|
|
|
virtual void setFocusObject(const MWWorld::Ptr& focus) = 0;
|
|
|
|
virtual void setFocusObjectScreenCoords(float min_x, float min_y, float max_x, float max_y) = 0;
|
|
|
|
|
2013-01-11 13:32:29 +00:00
|
|
|
virtual void setCursorVisible(bool visible) = 0;
|
2017-09-26 15:44:35 +00:00
|
|
|
virtual void setCursorActive(bool active) = 0;
|
2012-08-12 16:11:09 +00:00
|
|
|
virtual void getMousePosition(int &x, int &y) = 0;
|
|
|
|
virtual void getMousePosition(float &x, float &y) = 0;
|
|
|
|
virtual void setDragDrop(bool dragDrop) = 0;
|
2017-12-16 05:21:02 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Start of tes3mp addition
|
|
|
|
|
|
|
|
Allow the completion of a drag and drop from elsewhere in the code
|
|
|
|
*/
|
|
|
|
virtual void finishDragDrop() = 0;
|
|
|
|
/*
|
|
|
|
End of tes3mp addition
|
|
|
|
*/
|
|
|
|
|
2012-08-12 16:11:09 +00:00
|
|
|
virtual bool getWorldMouseOver() = 0;
|
|
|
|
|
2021-04-15 11:14:41 +00:00
|
|
|
virtual float getScalingFactor() = 0;
|
|
|
|
|
2014-05-16 07:21:08 +00:00
|
|
|
virtual bool toggleFogOfWar() = 0;
|
2012-08-12 16:11:09 +00:00
|
|
|
|
2014-05-16 07:21:08 +00:00
|
|
|
virtual bool toggleFullHelp() = 0;
|
2012-08-12 16:11:09 +00:00
|
|
|
///< show extra info in item tooltips (owner, script)
|
|
|
|
|
|
|
|
virtual bool getFullHelp() const = 0;
|
|
|
|
|
2014-05-11 00:27:43 +00:00
|
|
|
virtual void setActiveMap(int x, int y, bool interior) = 0;
|
|
|
|
///< set the indices of the map texture that should be used
|
2012-08-12 16:11:09 +00:00
|
|
|
|
2013-08-07 13:34:11 +00:00
|
|
|
/// sets the visibility of the drowning bar
|
|
|
|
virtual void setDrowningBarVisibility(bool visible) = 0;
|
|
|
|
|
2012-08-12 16:11:09 +00:00
|
|
|
/// sets the visibility of the hud health/magicka/stamina bars
|
|
|
|
virtual void setHMSVisibility(bool visible) = 0;
|
|
|
|
|
|
|
|
/// sets the visibility of the hud minimap
|
|
|
|
virtual void setMinimapVisibility(bool visible) = 0;
|
|
|
|
virtual void setWeaponVisibility(bool visible) = 0;
|
|
|
|
virtual void setSpellVisibility(bool visible) = 0;
|
2013-08-03 00:45:26 +00:00
|
|
|
virtual void setSneakVisibility(bool visible) = 0;
|
2012-08-12 16:11:09 +00:00
|
|
|
|
2017-08-18 15:24:34 +00:00
|
|
|
/// activate selected quick key
|
|
|
|
virtual void activateQuickKey (int index) = 0;
|
|
|
|
/// update activated quick key state (if action executing was delayed for some reason)
|
|
|
|
virtual void updateActivatedQuickKey () = 0;
|
2012-08-27 13:51:01 +00:00
|
|
|
|
2017-10-25 04:21:00 +00:00
|
|
|
/*
|
|
|
|
Start of tes3mp addition
|
|
|
|
|
|
|
|
Make it possible to add quickKeys from elsewhere in the code
|
|
|
|
*/
|
|
|
|
virtual void setQuickKey(int slot, int quickKeyType, MWWorld::Ptr item, const std::string& spellId = "") = 0;
|
|
|
|
/*
|
|
|
|
End of tes3mp addition
|
|
|
|
*/
|
|
|
|
|
2013-12-26 21:32:39 +00:00
|
|
|
virtual std::string getSelectedSpell() = 0;
|
2012-08-12 16:11:09 +00:00
|
|
|
virtual void setSelectedSpell(const std::string& spellId, int successChancePercent) = 0;
|
2013-04-03 19:14:49 +00:00
|
|
|
virtual void setSelectedEnchantItem(const MWWorld::Ptr& item) = 0;
|
2017-02-14 23:55:35 +00:00
|
|
|
virtual const MWWorld::Ptr& getSelectedEnchantItem() const = 0;
|
2013-04-03 19:14:49 +00:00
|
|
|
virtual void setSelectedWeapon(const MWWorld::Ptr& item) = 0;
|
2017-02-14 23:55:35 +00:00
|
|
|
virtual const MWWorld::Ptr& getSelectedWeapon() const = 0;
|
2018-06-18 09:43:39 +00:00
|
|
|
virtual int getFontHeight() const = 0;
|
2012-08-12 16:11:09 +00:00
|
|
|
virtual void unsetSelectedSpell() = 0;
|
|
|
|
virtual void unsetSelectedWeapon() = 0;
|
|
|
|
|
2012-08-27 17:18:55 +00:00
|
|
|
virtual void showCrosshair(bool show) = 0;
|
2012-08-29 09:15:17 +00:00
|
|
|
virtual bool getSubtitlesEnabled() = 0;
|
2017-09-23 10:58:28 +00:00
|
|
|
virtual bool toggleHud() = 0;
|
2020-03-10 21:39:11 +00:00
|
|
|
virtual MWGui::DragAndDrop& getDragAndDrop(void) = 0;
|
2012-08-27 17:18:55 +00:00
|
|
|
|
2012-08-12 23:26:15 +00:00
|
|
|
virtual void disallowMouse() = 0;
|
|
|
|
virtual void allowMouse() = 0;
|
|
|
|
virtual void notifyInputActionBound() = 0;
|
|
|
|
|
2012-09-20 16:02:37 +00:00
|
|
|
virtual void addVisitedLocation(const std::string& name, int x, int y) = 0;
|
|
|
|
|
2014-05-27 03:13:37 +00:00
|
|
|
/// Hides dialog and schedules dialog to be deleted.
|
2015-05-01 00:09:57 +00:00
|
|
|
virtual void removeDialog(MWGui::Layout* dialog) = 0;
|
2014-05-27 03:13:37 +00:00
|
|
|
|
|
|
|
///Gracefully attempts to exit the topmost GUI mode
|
2016-12-14 15:39:33 +00:00
|
|
|
/** No guarantee of actually closing the window **/
|
2014-05-27 03:13:37 +00:00
|
|
|
virtual void exitCurrentGuiMode() = 0;
|
2012-08-12 16:11:09 +00:00
|
|
|
|
2015-01-10 22:21:39 +00:00
|
|
|
virtual void messageBox (const std::string& message, enum MWGui::ShowInDialogueMode showInDialogueMode = MWGui::ShowInDialogueMode_IfPossible) = 0;
|
2013-05-03 10:44:27 +00:00
|
|
|
virtual void staticMessageBox(const std::string& message) = 0;
|
|
|
|
virtual void removeStaticMessageBox() = 0;
|
2017-07-13 15:58:48 +00:00
|
|
|
/*
|
2020-07-17 23:36:13 +00:00
|
|
|
Start of tes3mp change (major)
|
2017-07-13 15:58:48 +00:00
|
|
|
|
2020-07-17 23:36:13 +00:00
|
|
|
Add a hasServerOrigin boolean to the list of arguments so those messageboxes
|
|
|
|
can be differentiated from client-only ones
|
2017-07-13 15:58:48 +00:00
|
|
|
*/
|
2020-07-17 23:36:13 +00:00
|
|
|
virtual void interactiveMessageBox (const std::string& message,
|
|
|
|
const std::vector<std::string>& buttons = std::vector<std::string>(), bool block=false, bool hasServerOrigin=false) = 0;
|
2017-07-13 15:58:48 +00:00
|
|
|
/*
|
2020-07-17 23:36:13 +00:00
|
|
|
End of tes3mp change (major)
|
2017-07-13 15:58:48 +00:00
|
|
|
*/
|
|
|
|
|
2020-07-17 23:36:13 +00:00
|
|
|
/// returns the index of the pressed button or -1 if no button was pressed (->MessageBoxmanager->InteractiveMessageBox)
|
|
|
|
virtual int readPressedButton() = 0;
|
|
|
|
|
2020-05-26 12:54:04 +00:00
|
|
|
virtual void update (float duration) = 0;
|
2012-08-12 16:11:09 +00:00
|
|
|
|
2020-07-11 13:24:20 +00:00
|
|
|
virtual void updateConsoleObjectPtr(const MWWorld::Ptr& currentPtr, const MWWorld::Ptr& newPtr) = 0;
|
|
|
|
|
2012-08-12 16:11:09 +00:00
|
|
|
/**
|
|
|
|
* Fetches a GMST string from the store, if there is no setting with the given
|
|
|
|
* ID or it is not a string the default string is returned.
|
|
|
|
*
|
|
|
|
* @param id Identifier for the GMST setting, e.g. "aName"
|
|
|
|
* @param default Default value if the GMST setting cannot be used.
|
|
|
|
*/
|
2012-10-01 08:03:49 +00:00
|
|
|
virtual std::string getGameSettingString(const std::string &id, const std::string &default_) = 0;
|
2012-08-12 16:11:09 +00:00
|
|
|
|
2015-02-02 23:53:30 +00:00
|
|
|
virtual void processChangedSettings(const std::set< std::pair<std::string, std::string> >& changed) = 0;
|
2012-08-12 16:11:09 +00:00
|
|
|
|
|
|
|
virtual void executeInConsole (const std::string& path) = 0;
|
2012-09-11 14:37:54 +00:00
|
|
|
|
2017-11-22 22:21:47 +00:00
|
|
|
/*
|
|
|
|
Start of tes3mp addition
|
|
|
|
|
|
|
|
Allow the execution of console commands from elsewhere in the code
|
|
|
|
*/
|
|
|
|
virtual void executeCommandInConsole(const std::string& command) = 0;
|
|
|
|
/*
|
|
|
|
End of tes3mp addition
|
|
|
|
*/
|
|
|
|
|
2012-09-15 18:18:41 +00:00
|
|
|
virtual void enableRest() = 0;
|
|
|
|
virtual bool getRestEnabled() = 0;
|
2013-05-16 11:35:28 +00:00
|
|
|
virtual bool getJournalAllowed() = 0;
|
2012-09-19 01:11:23 +00:00
|
|
|
|
|
|
|
virtual bool getPlayerSleeping() = 0;
|
2012-09-29 07:41:34 +00:00
|
|
|
virtual void wakeUpPlayer() = 0;
|
2012-09-22 22:36:20 +00:00
|
|
|
|
2013-03-30 14:51:07 +00:00
|
|
|
virtual void showSoulgemDialog (MWWorld::Ptr item) = 0;
|
|
|
|
|
2013-03-07 11:46:26 +00:00
|
|
|
virtual void changePointer (const std::string& name) = 0;
|
2012-12-31 00:15:47 +00:00
|
|
|
|
2013-07-30 04:00:20 +00:00
|
|
|
virtual void setEnemy (const MWWorld::Ptr& enemy) = 0;
|
|
|
|
|
2018-10-28 07:44:14 +00:00
|
|
|
virtual int getMessagesCount() const = 0;
|
|
|
|
|
2012-12-31 00:15:47 +00:00
|
|
|
virtual const Translation::Storage& getTranslationDataStorage() const = 0;
|
2013-06-16 16:06:55 +00:00
|
|
|
|
2019-06-08 23:08:09 +00:00
|
|
|
/// Warning: do not use MyGUI::InputManager::setKeyFocusWidget directly. Instead use this.
|
|
|
|
virtual void setKeyFocusWidget (MyGUI::Widget* widget) = 0;
|
|
|
|
|
2018-09-04 05:15:07 +00:00
|
|
|
virtual void loadUserFonts() = 0;
|
|
|
|
|
2013-08-27 13:48:13 +00:00
|
|
|
virtual Loading::Listener* getLoadingScreen() = 0;
|
2013-11-20 15:05:24 +00:00
|
|
|
|
|
|
|
/// Should the cursor be visible?
|
|
|
|
virtual bool getCursorVisible() = 0;
|
2014-01-25 12:34:56 +00:00
|
|
|
|
|
|
|
/// Clear all savegame-specific data
|
|
|
|
virtual void clear() = 0;
|
2014-01-25 17:20:17 +00:00
|
|
|
|
2014-04-28 09:29:57 +00:00
|
|
|
virtual void write (ESM::ESMWriter& writer, Loading::Listener& progress) = 0;
|
2015-01-22 18:04:59 +00:00
|
|
|
virtual void readRecord (ESM::ESMReader& reader, uint32_t type) = 0;
|
2014-05-01 19:16:32 +00:00
|
|
|
virtual int countSavedGameRecords() const = 0;
|
2014-05-02 09:20:43 +00:00
|
|
|
|
|
|
|
/// Does the current stack of GUI-windows permit saving?
|
|
|
|
virtual bool isSavingAllowed() const = 0;
|
2014-05-27 07:00:31 +00:00
|
|
|
|
2015-03-11 19:04:25 +00:00
|
|
|
/// Send exit command to active Modal window
|
|
|
|
virtual void exitCurrentModal() = 0;
|
2014-05-27 07:00:31 +00:00
|
|
|
|
|
|
|
/// Sets the current Modal
|
|
|
|
/** Used to send exit command to active Modal when Esc is pressed **/
|
2014-05-27 08:38:13 +00:00
|
|
|
virtual void addCurrentModal(MWGui::WindowModal* input) = 0;
|
|
|
|
|
|
|
|
/// Removes the top Modal
|
|
|
|
/** Used when one Modal adds another Modal
|
|
|
|
\param input Pointer to the current modal, to ensure proper modal is removed **/
|
|
|
|
virtual void removeCurrentModal(MWGui::WindowModal* input) = 0;
|
2014-06-10 15:47:59 +00:00
|
|
|
|
|
|
|
virtual void pinWindow (MWGui::GuiWindow window) = 0;
|
2019-04-26 07:37:57 +00:00
|
|
|
virtual void toggleMaximized(MWGui::Layout *layout) = 0;
|
2014-08-01 14:25:41 +00:00
|
|
|
|
|
|
|
/// Fade the screen in, over \a time seconds
|
2017-09-24 17:15:39 +00:00
|
|
|
virtual void fadeScreenIn(const float time, bool clearQueue=true, float delay=0.f) = 0;
|
2014-08-01 14:25:41 +00:00
|
|
|
/// Fade the screen out to black, over \a time seconds
|
2017-09-24 17:15:39 +00:00
|
|
|
virtual void fadeScreenOut(const float time, bool clearQueue=true, float delay=0.f) = 0;
|
2014-08-01 14:25:41 +00:00
|
|
|
/// Fade the screen to a specified percentage of black, over \a time seconds
|
2017-09-24 17:15:39 +00:00
|
|
|
virtual void fadeScreenTo(const int percent, const float time, bool clearQueue=true, float delay=0.f) = 0;
|
2014-10-12 17:06:40 +00:00
|
|
|
/// Darken the screen to a specified percentage
|
|
|
|
virtual void setBlindness(const int percent) = 0;
|
2014-09-28 15:57:14 +00:00
|
|
|
|
2014-10-11 20:21:48 +00:00
|
|
|
virtual void activateHitOverlay(bool interrupt=true) = 0;
|
2014-10-05 15:53:50 +00:00
|
|
|
virtual void setWerewolfOverlay(bool set) = 0;
|
|
|
|
|
2019-05-16 06:28:56 +00:00
|
|
|
virtual void toggleConsole() = 0;
|
2014-09-28 15:57:14 +00:00
|
|
|
virtual void toggleDebugWindow() = 0;
|
2014-12-15 14:23:03 +00:00
|
|
|
|
|
|
|
/// Cycle to next or previous spell
|
|
|
|
virtual void cycleSpell(bool next) = 0;
|
|
|
|
/// Cycle to next or previous weapon
|
|
|
|
virtual void cycleWeapon(bool next) = 0;
|
2015-05-01 16:37:24 +00:00
|
|
|
|
2018-05-01 12:21:58 +00:00
|
|
|
virtual void playSound(const std::string& soundId, float volume = 1.f, float pitch = 1.f) = 0;
|
2017-07-10 11:48:00 +00:00
|
|
|
|
2015-05-01 16:37:24 +00:00
|
|
|
// In WindowManager for now since there isn't a VFS singleton
|
|
|
|
virtual std::string correctIconPath(const std::string& path) = 0;
|
2017-09-08 20:50:07 +00:00
|
|
|
virtual std::string correctBookartPath(const std::string& path, int width, int height, bool* exists = nullptr) = 0;
|
2015-05-01 16:37:24 +00:00
|
|
|
virtual std::string correctTexturePath(const std::string& path) = 0;
|
2016-03-24 15:52:16 +00:00
|
|
|
virtual bool textureExists(const std::string& path) = 0;
|
2015-05-26 14:40:44 +00:00
|
|
|
|
2019-02-20 13:37:00 +00:00
|
|
|
virtual void addCell(MWWorld::CellStore* cell) = 0;
|
2015-05-26 14:40:44 +00:00
|
|
|
virtual void removeCell(MWWorld::CellStore* cell) = 0;
|
2015-05-28 01:50:44 +00:00
|
|
|
virtual void writeFog(MWWorld::CellStore* cell) = 0;
|
2017-07-24 11:25:01 +00:00
|
|
|
|
|
|
|
virtual const MWGui::TextColours& getTextColours() = 0;
|
2017-09-22 14:52:39 +00:00
|
|
|
|
2018-09-09 19:10:09 +00:00
|
|
|
virtual bool injectKeyPress(MyGUI::KeyCode key, unsigned int text, bool repeat) = 0;
|
2018-09-10 08:55:00 +00:00
|
|
|
virtual bool injectKeyRelease(MyGUI::KeyCode key) = 0;
|
2020-04-16 13:31:20 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void windowVisibilityChange(bool visible) override = 0;
|
|
|
|
void windowResized(int x, int y) override = 0;
|
|
|
|
void windowClosed() override = 0;
|
2020-04-16 13:31:20 +00:00
|
|
|
virtual bool isWindowVisible() = 0;
|
2020-06-05 14:22:53 +00:00
|
|
|
|
|
|
|
virtual void watchActor(const MWWorld::Ptr& ptr) = 0;
|
|
|
|
virtual MWWorld::Ptr getWatchedActor() const = 0;
|
2021-01-17 11:12:14 +00:00
|
|
|
|
|
|
|
virtual void viewerTraversals(bool updateWindowManager) = 0;
|
2012-08-12 16:11:09 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|