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

Simplified character record sheet editor. More...

#include <simplecse.hpp>

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

Public Types

enum  { NewCharacter, Paused, XPGranted }
enum  alignment { Center, Left, Right }
 window contents alignment enum More...
enum  Rendermode { ForReal, ForCoords3D, ForCoordsGame }
 purpose of rendering. ForReal is "to display", ForCoords3D is "to determine where user has clicked" More...

Public Member Functions

void Refresh ()
void Render (Renderable::Rendermode mode)
 rendering routine of a window
void Animate (float dt)
 some windows are animated
void SetState (int s)
 reason for which it is displayed (NewCharacter, Paused, XPGranted). don't call this routine when SimpleCSE is up
 SimpleCSE (MapWindow *_M)
 a constructor
void StartGame (LxS::Windowing::Button *b)
 start game
void Main (LxS::Windowing::Button *b)
 return to main menu
void Initialize ()
 load resources, prepare to display
void SetShowFluff (bool f)
 display expanded description in feature selection boxes
bool GetShowFluff ()
 do I display those in feature selection boxes
float GetInitializedPercentage ()
 0= uninitialized; 100=ready; other? for progress bars
void AttachRulesSystem (const SWRS::RulesSystem *rs)
 Attach savage worlds rules system.
void AttachCharacter (SWRS::Character *ch)
 Attach character.
void SaveFile ()
 genericized event handler - passed to children
void SetAlignment (int a)
 set alignment (left, right, center)
virtual void DetachFooter ()
 remove footer
virtual void AttachFooter (ContainerWindow *f)
 single subwindow
virtual void AttachChild (Window *child)
 attach child at end
virtual void DetachChild (Window *child)
 detach particular child
virtual void ReplaceChild (Window *old_child, Window *new_child)
 replace child. new is emplaced at position right before old one
virtual void EraseChildren ()
 remove all children
virtual void AttachChildAtFront (Window *child)
 attach child at front
void OnFocus ()
 window appears
ButtonHandler GenerateTransitionFunction (Window *target)
 return function object
void AttachSubForm (Form *sf)
 attasch form object - it will be serviced in form's default initialize/unloadresources functions
void SetBackground (const std::string &background)
 set path to background image
const std::string GetBackground ()
 get path to background image
virtual void Back (Button *b)
 back button pressed
virtual void SetBackLink (Window *b)
 link to "previous" - window that will be maximized after pressing "back"
virtual void Arrange ()
 arrange contents (called after movement/resize)
void MovementHandler ()
 rearrange after movement
void ResizeHandler ()
 rearrange after resizing
virtual void Render (Rendermode mode)
 render something
virtual void Released (float x, float y)
virtual void Clicked (float x, float y)
virtual void Dragged (float x, float y)
void UnloadResources ()
 free resources to save some space
virtual void BackButtonPressed ()
 click handler for "back" button
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
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 ()
virtual void MenuButtonPressed ()
 menu button - on android phone (no such button on iphone)
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

EditorCommonStatus * GetCommonStatus () throw ()
 return common status object
void ReinitEditor ()
 reinitialize editor (i.e. upon loading new character)
void ResetCharacter (LxS::Windowing::Button *b)
 reset character
void TransitionFunction (Button *b, Window *target)
 function for switching to other window (when form button is clicked)
void MoveContents (float y)
void RenderBackground (Renderable::Rendermode mode)
 utility method for rendering background image
void ResetForm ()
 remove children and subforms
virtual void PositionBackButton ()
 set position of "back" button
FormGetParentForm ()
 return form that shall be presented upon clicking "back"
void Error (const std::string &message, Form *target)
 error message
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

EditorCommonStatus * cs
 pointer shared by all forms of editor
bool reset_in_progress
bool show_fluff
 show/hide flavor texts
AttributesForm * af
 attributes form
SkillsForm * sf
 skills form
DerivedStatsForm * dsf
 derived stats form
HindrancesForm * hf
 hindrances form
EdgesForm * ef
 edges form
RaceSelectionForm * rf
 race selection form
Summary * s
 character summary
PowersForm * pf
 powers selection form
Button * back_button
 "back" button
 window, that is gonna be displayed when "back" button is pressed
Rectangle2D * background
 background image
std::list< Form * > subforms
 subforms (are handled in refresh routine)
float internal_height
 height of contents
float reference_y
float position_y
 position of contents
int num_columns
 number of columns
float far_top
 top of topmost element
float far_bottom
 bottom of lowest element
int align
 alignment (Left , Right, Center)
 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

Simplified character record sheet editor.

Member Enumeration Documentation

window contents alignment enum


content is centered


content is aligned to left


content is aligned to right (NOT IMPLEMENTED)

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


proper rendering for display


rendering for coordinate detection


for detection of ingame coordinate system - unused

Member Function Documentation

virtual void LxS::Windowing::Form::Clicked ( float  x,
float  y 

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

Reimplemented from LxS::Windowing::ContainerWindow.

Reimplemented in LxS::Game::Help::Help.

virtual void LxS::Windowing::Form::Dragged ( float  x,
float  y 

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

Reimplemented from LxS::Windowing::ContainerWindow.

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

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

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.

virtual void LxS::Windowing::Form::Released ( float  x,
float  y 

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

Reimplemented from LxS::Windowing::ContainerWindow.

Member Data Documentation

ContainerWindow* LxS::Windowing::Form::footer

special set of form items added to footer

float LxS::Windowing::Form::reference_y

point from which dragging has started

bool SWCE::Editor::reset_in_progress

if resetting an editor is in progress, it is unusable. don't do anything stupid as you may cause memory error or worse!

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