b3view/UserInterface.h

67 lines
1.4 KiB
C
Raw Normal View History

2010-04-21 07:48:36 -07:00
#ifndef USERINTERFACE_H
#define USERINTERFACE_H
// Forward declaration of class Engine
class Engine;
#include <sstream>
2010-04-21 07:48:36 -07:00
#include <string>
2019-03-07 08:12:09 -08:00
#include <irrlicht/irrlicht.h>
2010-04-21 07:48:36 -07:00
#include "Debug.h"
#include "Engine.h"
#include "extlib/CGUITTFont.h"
2010-04-21 07:48:36 -07:00
using namespace irr;
using namespace irr::core;
using namespace irr::gui;
using std::string;
using std::wstring;
enum UserInterfaceElements
{
2010-04-23 02:00:07 -07:00
UIE_PLAYBACKWINDOW = 1000,
UIE_LOADBUTTON = 1001,
UIE_LOADFILEDIALOG = 1002,
UIE_FILEMENU = 1003,
2010-08-16 05:23:20 -07:00
UIE_PLAYBACKSTARTSTOPBUTTON = 1004,
UIE_VIEWMENU = 1005
2010-04-21 07:48:36 -07:00
};
enum UserInterfaceCommands
{
UIC_FILE_LOAD = 1000,
2010-08-16 05:23:20 -07:00
UIC_FILE_QUIT = 1001,
UIC_VIEW_WIREFRAME = 2000,
UIC_VIEW_LIGHTING = 2001
2010-04-21 07:48:36 -07:00
};
class UserInterface : public IEventReceiver
{
private:
Engine *m_Engine;
IGUIEnvironment *m_Gui;
CGUITTFont *m_GuiFont;
CGUITTFace *m_GuiFontFace;
2010-04-21 07:48:36 -07:00
void setupUserInterface();
void displayLoadFileDialog();
void handleMenuItemPressed( IGUIContextMenu *menu );
2010-08-16 05:23:20 -07:00
bool m_WireframeDisplay;
bool m_Lighting;
2010-04-21 07:48:36 -07:00
public:
UserInterface( Engine *device );
~UserInterface();
IGUIEnvironment * getGUIEnvironment() const;
void drawStatusLine() const;
2010-04-21 07:48:36 -07:00
// IEventReceiver
virtual bool OnEvent( const SEvent &event );
};
#endif // USERINTERFACE_H