Labyrinth
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
LxS::Game::MapWindowOverlay Class Reference

Current status (HUD) of game (HP, battle mode results etc.) More...

#include <mapwindowoverlay.hpp>

Inheritance diagram for LxS::Game::MapWindowOverlay:
Inheritance graph
Collaboration diagram for LxS::Game::MapWindowOverlay:
Collaboration graph

Public Types

enum  { ProtagWounded, EnemyWounded, ProtagHealed }
 enumeration of causes for message. Used in color parameter of AddMessage i.e. (each of these presets has colour associated with it)
 
enum  Rendermode { ForReal, ForCoords3D, ForCoordsGame }
 purpose of rendering. ForReal is "to display", ForCoords3D is "to determine where user has clicked" More...
 

Public Member Functions

 MapWindowOverlay ()
 default ctor. Need to SetCurrentMap before initializing
 
void ClearTalkMode ()
 clear dialogs
 
void InitiateTalk ()
 start talk mode - display greetings message from an NPC
 
void TalkToNPC ()
 Display dialogue options.
 
void MakeNPCTalk ()
 display sentence said by an NPC
 
void SetCurrentMap (Map *_currentMap)
 Associate Map object with this overlay object. More...
 
void ResizeHandler ()
 handle window resize (rearrange contents
 
void AddMessage (std::string msg, int color)
 report something (i.e. that enemy was wounded)
 
void Reset ()
 reset (clear) all displayed messages
 
void UnloadResources ()
 free resources to save some space
 
void SetCurrentActionProgress (float p)
 set progress of current action More...
 
void DropCurrentActionProgress ()
 drop current progressbar
 
void ClearActionProgressQueue ()
 clear sequence of progressbar. (i.e. upon leaving battlemode)
 
void AddActionProgress (const std::string &_text)
 add progressbar (i.e. upon entering battlemode)
 
void Render (Rendermode mode)
 render something
 
void Animate (float dt)
 some windows are animated
 
void Initialize ()
 load resources, prepare to display
 
virtual void EraseChildren ()
 remove all children
 
virtual void AttachChildAtFront (Window *child)
 attach child - first to be drawn, first on auto-generated layouts
 
virtual void AttachChild (Window *child)
 attach child at end
 
virtual void DetachChild (Window *child)
 detach particular child
 
virtual void OnFocus ()
 window appears
 
virtual void ReplaceChild (Window *old_child, Window *new_child)
 replace child. new is emplaced at position right before old one
 
void MovementHandler ()
 rearrange after movement
 
virtual void Render (Renderable::Rendermode mode)
 rendering routine of a window
 
void SaveFile ()
 for autosave routine or else
 
virtual void Clicked (float x, float y)
 
virtual void Released (float x, float y)
 
virtual void Dragged (float x, float y)
 
virtual void DraggedAngle (float x, float y)
 as degrees given current camera angle!
 
virtual unsigned long GetTexelsCount ()
 sum of dimensionsxdepths of all textures
 
virtual unsigned long GetFacesCount ()
 all 3D faces
 
virtual void Refresh ()
 rearrange
 
WindowGetRoot ()
 recursive GetParent;
 
WindowGetParent ()
 Return parent window.
 
float GetX ()
 return position x (from bottom left corner)
 
float GetY ()
 return position y (from bottom left corner)
 
float GetWidth ()
 return height of the window
 
float GetHeight ()
 return width of the window
 
virtual float SetX (float f)
 set position x (from bottom left corner)
 
virtual float SetY (float f)
 set position y (from bottom left corner)
 
virtual float SetWidth (float f)
 set width of the window
 
virtual float SetHeight (float f)
 set height of the window
 
virtual void SetWH (float w, float h)
 set width and height of the window
 
virtual void SetYX (float y, float x)
 set position - both coords (from bottom left corner)
 
virtual void JoystickAxes (int Axis, const float *direction)
 
virtual void SetParent (Window *_parent)
 set pointer to parent window
 
virtual void Maximize ()
 maximize
 
virtual void MenuButtonPressed ()
 menu button - on android phone (no such button on iphone)
 
virtual void BackButtonPressed ()
 back button - on android phone (no such button on iphone)
 
float GetInitializedPercentage ()
 0= uninitialized; 100=ready; other? for progress bars
 
virtual void RefreshAssets ()
 To facilitate refreshing app after switching OpenGL Context (as in Android lifecycle)
 

Protected Types

typedef Windowchilddata
 typedef of pointer to window
 
typedef std::vector< childdatachildvector
 typedef for vector of contained windows
 

Protected Member Functions

void ReplaceSelf (Window *replacement)
 replace reference to this in parent window for a new window does not delete this from main memory - only swaps pointer in parent window
 

Protected Attributes

Windowclicked
 which subwindow may be clicked?
 
childvector children
 windows within this window
 
float initialized_percentage
 0-100; 0- just constructed; 100 - redy to render; 0-100 - for progressbar
 

Detailed Description

Current status (HUD) of game (HP, battle mode results etc.)

Member Enumeration Documentation

purpose of rendering. ForReal is "to display", ForCoords3D is "to determine where user has clicked"

Enumerator
ForReal 

proper rendering for display

ForCoords3D 

rendering for coordinate detection

ForCoordsGame 

for detection of ingame coordinate system - unused

Member Function Documentation

void ContainerWindow::Clicked ( float  x,
float  y 
)
virtualinherited

window was clicked; coordinates from left-bottom corner of the window

Reimplemented from LxS::Windowing::Window.

Reimplemented in LxS::Game::MapWindow, LxS::Windowing::Form, LxS::Game::Help::Help, and LxS::Game::Help::HintBox.

void ContainerWindow::Dragged ( float  x,
float  y 
)
virtualinherited

object within window is dragged; coordinates from left-bottom corner of the window

Reimplemented from LxS::Windowing::Window.

Reimplemented in LxS::Windowing::VirtualKeypad, LxS::Game::MapWindow, LxS::Windowing::Form, and LxS::Game::Help::Help.

virtual void LxS::Windowing::Window::JoystickAxes ( int  Axis,
const float *  direction 
)
inlinevirtualinherited

axis-numbering: 0-1, left analog X-Y; 2-3, right analog 4-7 - nothing; 8 d-pad up; 9 dpad right; 10 dpad down; 11 dpad left 12 - l2, 13-r2, 14- l1, 15 - r1 16 - triangle, 17 - circle, 18 - cross, 19 - square; 20 - nothing

Reimplemented in LxS::Game::MapWindow, Labyrinth::Root, LxS::Windowing::Root, and SWCE::RaceSelectionForm.

void ContainerWindow::Released ( float  x,
float  y 
)
virtualinherited

window was pressed and released; coordinates from left-bottom corner of the window

Reimplemented from LxS::Windowing::Window.

Reimplemented in LxS::Game::MapWindow, and LxS::Windowing::Form.

void MapWindowOverlay::SetCurrentActionProgress ( float  p)

set progress of current action

Parameters
pprogress [0-1]
void LxS::Game::MapWindowOverlay::SetCurrentMap ( Map _currentMap)
inline

Associate Map object with this overlay object.

Parameters
_currentMapa map object for which this overlay is used

The documentation for this class was generated from the following files: