Skyline Lua API  Version 1.0 RC1
Lua Script Reference for Skyline Game Engine.
LUA_API_Gui.h
Go to the documentation of this file.
1 // | _ ____ __ _
2 // | / \ _ _ _ __ __ _/ ___| ___ / _| |_
3 // | / _ \| | | | '__/ _` \___ \ / _ \| |_| __|
4 // | / ___ \ |_| | | | (_| |___) | (_) | _| |_
5 // | /_/ \_\__,_|_| \__,_|____/ \___/|_| \__|
6 // |
7 // | Aurasoft UK 2008 - 2016 http://www.aurasoft.co.uk
8 // |
9 // | Skyline Game Engine Lua API Documentation
10 // |
11 // | This file belongs to Aurasoft UK for the Skyline Game Engine of all versions.
12 // | This file is not for use in any other software that is not owned by Aurasoft UK and cannot be used by any other
13 // | person outside of the Skyline Game Engine development team.
14 // |
15 // | © Copyright - Aurasoft UK & Skyline Game Engine 2008 - 2016
16 // |
17 
18 // SKYLINE LUA CLASS FOR API DOCUMENTATION
19 
41 class gui
42 {
43 public:
44 
60  void setFontFamily( String bodyId, String ElementID, String fontName);
61 
62 
78  void setFontWeight( String bodyId, String ElementID, String weight);
79 
80 
96  void setFontStyle( String bodyId, String ElementID, String style);
97 
98 
114  void setFontSize( String bodyId, String ElementID, String size);
115 
116 
133  void setProperty( String bodyId, String ElementID, String param, String value);
134 
135 
136 
152  void setBackgroundColor( String bodyId, String ElementID, String color);
153 
154 
170  void setFontColor( String bodyId, String ElementID, String color);
171 
172 
197  void setText( String bodyId, String childID, String text);
198 
223  void getText( String bodyId, String childID);
224 
225 
242  void setPosition( String bodyId, String childID, int x, int y);
243 
244 
260  void setPosY( String bodyId, String childID, int y);
261 
262 
278  void setPosX( String bodyId, String childID, int x);
279 
280 
296  void setScaleX( String bodyId, String childID, int w);
297 
298 
314  void setScaleXCent( String bodyId, String childID, int w);
315 
316 
332  void setScaleY( String bodyId, String childID, int h);
333 
334 
350  void setScaleYCent( String bodyId, String childID, int h);
351 
352 
367  void show( String bodyId, String ElementID);
368 
369 
384  void hide( String bodyId, String ElementID);
385 
386 
401  void setFullScreen( String bodyId);
402 
403 
420  void setWindowPosition( String bodyId,int x, int y);
421 
422 
439  void setWindowSize( String bodyId,int w, int h);
440 
441 
457  void workSpace(String workspace_folder);
458 
459 
474  String load(String FileName, int posX, int posY);
475 
486  close(String bodyID);
487 
488 
502  void enableGameInput( int state_keys, int state_mouse );
503 
504 
516  void hideCursor();
517 
518 
530  void showCursor();
531 
541  void gui.loadFromTemplate();
542 
543 
555  void string = gui.getProperty(bodyID, elementID, param);
556 
568  void string = string = gui.getAttribute(bodyID, elementID, param);
569 
582  void gui.setAttribute(bodyID, elementID, param, value);
583 
584 
598  loadFromTemplate (string "gui_doc.rml", int posX, int posY);
599 
612  string workSpace (string "workspaceFolder/");
613 
627  setWindowPositionCent(string bodyID, int posx, int posy );
628 
643  setAttribute(string bodyID, string elementName, string property, string value);
644 
658  string getProperty(string bodyID, string elementName, string property);
659 
660 
674  string getAttribute(string bodyID, string elementName, string property);
675 
676 };
677 
678 /*
679 
680 setFontFamily( String bodyId, String ElementID, String fontName);
681 setFontWeight( String bodyId, String ElementID, String weight);
682 setFontStyle( String bodyId, String ElementID, String style);
683 setProperty( String bodyId, String ElementID, String param, String value);
684 setFontSize( String bodyId, String ElementID, String color);
685 setBackgroundColor( String bodyId, String ElementID, String color);
686 setFontColor( String bodyId, String ElementID, String color);
687 setText( String bodyId, String childID, String text);
688 setPosition( String bodyId, String childID, int x, int y);
689 setPosY( String bodyId, String childID, int y);
690 setPosX( String bodyId, String childID, int x);
691 setScaleX( String bodyId, String childID, int w);
692 setScaleXCent( String bodyId, String childID, int w);
693 setScaleY( String bodyId, String childID, int w);
694 setScaleYCent( String bodyId, String childID, int w);
695 show( String bodyId, String childID);
696 hide( String bodyId, String childID);
697 setFullScreen( String bodyId);
698 setWindowPosition( String bodyId,int x, int y);
699 setWindowSize( String bodyId,int x, int y);
700 workSpace(String workspace_folder);
701 string body_id = gui.load(String FileName, int posX, int posY);
702 gui.enableGameInput( int state_keys, int state_mouse );
703 gui.hideCursor();
704 gui.showCursor();
705 
706 */
void setWindowSize(String bodyId, int w, int h)
Sets the width and height of a document.
void setFontSize(String bodyId, String ElementID, String size)
Sets the current fonts size.
Definition: LUA_API_Gui.h:41
void gui setAttribute(bodyID, elementID, param, value)
gui.setAttribute(bodyID, elementID, param, value);
void gui loadFromTemplate()
Load From Template. .
void workSpace(String workspace_folder)
A document must have its workspace folder defined prior to loading the file. This ensures that all im...
void setScaleYCent(String bodyId, String childID, int h)
Set the width scale of an element in %.
String load(String FileName, int posX, int posY)
Loads a document file fromt he workspace folder and displays it on screen at an optional xy position...
void setScaleY(String bodyId, String childID, int h)
Set the height scale of an element in pixels.
void setBackgroundColor(String bodyId, String ElementID, String color)
Sets the element background to the color pass in the color arg..
void hideCursor()
Hide the gui cursor .
void enableGameInput(int state_keys, int state_mouse)
Special feature to disable key and mouse movement. This can be used when getting user data from a tex...
void setFontStyle(String bodyId, String ElementID, String style)
Sets the current fonts style this can be either normal or italic.
void setScaleXCent(String bodyId, String childID, int w)
Set the width scale of an element in %.
string getProperty(string bodyID, string elementName, string property)
Get property of an element.
void setFontColor(String bodyId, String ElementID, String color)
Sets the current fonts color.
void show(String bodyId, String ElementID)
Shows an already loaded document.
string getAttribute(string bodyID, string elementName, string property)
Get property of an element.
void setFontFamily(String bodyId, String ElementID, String fontName)
Sets the styles current font name.
void setWindowPosition(String bodyId, int x, int y)
Sets the position of a document.
void setPosX(String bodyId, String childID, int x)
Set the Y position of an element.
void hide(String bodyId, String ElementID)
Hides an already visibly loaded document.
close(String bodyID)
Closes an open gui document.
void setPosition(String bodyId, String childID, int x, int y)
Set the position of an element.
void getText(String bodyId, String childID)
Returns the text between an element div tag including any HTML code.
setWindowPositionCent(string bodyID, int posx, int posy)
Set the position in screen.
void setFullScreen(String bodyId)
Sets the document to the current screens size.
void setProperty(String bodyId, String ElementID, String param, String value)
This command can be use to set various style sheet properties.
void setText(String bodyId, String childID, String text)
Sets the body text in the element.
void setScaleX(String bodyId, String childID, int w)
Set the width scale of an element in pixels.
void setPosY(String bodyId, String childID, int y)
Set the Y position of an element.
void setFontWeight(String bodyId, String ElementID, String weight)
Sets the current fonts weight this can be either normal or bold.
void showCursor()
Show the gui cursor. .