1 /******************************************************************************
2 * irrlamb - https://github.com/jazztickets/irrlamb
3 * Copyright (C) 2019  Alan Witkowski
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 *******************************************************************************/
18 #pragma once
19 #include <IEventReceiver.h>
20 
21 // Classes
22 class _State {
23 
24 	public:
25 
26 		// Setup functions
Init()27 		virtual int Init() { return 1; }
Close()28 		virtual int Close() { return 1; }
29 
~_State()30 		virtual ~_State() { }
31 
32 		// Events
HandleAction(int InputType,int Action,float Value)33 		virtual bool HandleAction(int InputType, int Action, float Value) { return false; }
HandleKeyPress(int Key)34 		virtual bool HandleKeyPress(int Key) { return false; }
HandleKeyLift(int Key)35 		virtual bool HandleKeyLift(int Key) { return false; }
HandleMouseMotion(float UpdateX,float UpdateY)36 		virtual void HandleMouseMotion(float UpdateX, float UpdateY) { }
HandleMousePress(int Button,int MouseX,int MouseY)37 		virtual bool HandleMousePress(int Button, int MouseX, int MouseY) { return false; }
HandleMouseLift(int Button,int MouseX,int MouseY)38 		virtual void HandleMouseLift(int Button, int MouseX, int MouseY) { }
HandleMouseWheel(float Direction)39 		virtual void HandleMouseWheel(float Direction) { }
HandleGUI(irr::gui::EGUI_EVENT_TYPE EventType,irr::gui::IGUIElement * Element)40 		virtual void HandleGUI(irr::gui::EGUI_EVENT_TYPE EventType, irr::gui::IGUIElement *Element) { }
41 
42 		// Update
Update(float FrameTime)43 		virtual void Update(float FrameTime) { }
UpdateRender(float TimeStepRemainder)44 		virtual void UpdateRender(float TimeStepRemainder) { }
Draw()45 		virtual void Draw() { }
46 
47 	private:
48 
49 };
50