https://wiki.kag2d.com/api.php?action=feedcontributions&user=Verrazano&feedformat=atom
King Arthur's Gold Wiki - User contributions [en]
2024-03-28T17:13:43Z
User contributions
MediaWiki 1.23.14
//wiki.kag2d.com/wiki/SColor
SColor
2012-09-28T23:19:06Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
The SColor type is used in GUI functions such as DrawRectangle.<br />
</onlyinclude><br />
<br />
<syntaxhighlight lang="cpp"><br />
SColor color ( const uint alpha, const uint red, const uint green, const uint blue )<br />
</syntaxhighlight><br />
<br />
'''Example'''<br />
<br />
<syntaxhighlight lang="cpp"><br />
GUI::DrawRectangle(rect, SColor(255, 25, 25, 25, 0));<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/String
String
2012-09-28T21:42:18Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude>String is used for storing strings of characters.</onlyinclude><br />
<br />
<syntaxhighlight lang="cpp"><br />
string s = "hello world"<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/Vec2f
Vec2f
2012-09-28T21:41:59Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
The Vec2f type is mainly used in the blob for positioning and getting the mouse coordinates.<br />
</onlyinclude> <br />
<br />
Vec2f contains two variables '''x''' and '''y'''.<br />
<br />
<syntaxhighlight lang="cpp"><br />
Vec2f pos ( f32, f32 )<br />
</syntaxhighlight><br />
<br />
'''Example'''<br />
<br />
<syntaxhighlight lang="cpp"><br />
Vec2f pos;<br />
pos = this.getPosition();<br />
pos+50;<br />
this.SetPosition(pos);<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/SColor
SColor
2012-09-28T21:41:40Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
The SColor type is used in GUI functions such as DrawRectangle.<br />
</onlyinclude><br />
<br />
<syntaxhighlight lang="cpp"><br />
SColor color ( const uint, const uint, const uint, const uint )<br />
</syntaxhighlight><br />
<br />
'''Example'''<br />
<br />
<syntaxhighlight lang="cpp"><br />
GUI::DrawRectangle(rect, SColor(255, 25, 25, 25, 0));<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/DrawText
DrawText
2012-09-28T21:32:13Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Draws some text.<br />
</onlyinclude><br />
<br />
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.<br />
<br />
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.<br />
<br />
This method has two variants.<br />
<syntaxhighlight lang="cpp"><br />
void GUI::DrawText( const string &text, recti rect, SColor color, bool HorCenter, bool VerCenter )<br />
void GUI::DrawText( const string &text, position2di pos, SColor color )<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting]]<br />
[[Category:Global Functions]]<br />
<br />
'''Example'''<br />
<br />
<syntaxhighlight lang="cpp"><br />
void onRender(CRules@ this)<br />
{<br />
GUI::DrawText("HELLO WORLD", position2di(400, 400), SColor(255, 105, 25, 5));<br />
<br />
}<br />
</syntaxhighlight><br />
<br />
[[File:Text.png]]</div>
Verrazano
//wiki.kag2d.com/wiki/DrawText
DrawText
2012-09-28T21:31:55Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Draws some text.<br />
</onlyinclude><br />
<br />
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.<br />
<br />
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.<br />
<br />
This method has two variants.<br />
<syntaxhighlight lang="cpp"><br />
void GUI::DrawText( const string &text, recti rect, SColor color, bool HorCenter, bool VerCenter )<br />
void GUI::DrawText( const string &text, position2di pos, SColor color )<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting]]<br />
[[Category:Global Functions]]<br />
<br />
'''Example'''<br />
<br />
<syntachighlight lang="cpp"><br />
void onRender(CRules@ this)<br />
{<br />
GUI::DrawText("HELLO WORLD", position2di(400, 400), SColor(255, 105, 25, 5));<br />
<br />
}<br />
</syntaxhighlight><br />
<br />
[[File:Text.png]]</div>
Verrazano
//wiki.kag2d.com/wiki/File:Text.png
File:Text.png
2012-09-28T21:31:46Z
<p>Verrazano: GUI::DrawText</p>
<hr />
<div>GUI::DrawText</div>
Verrazano
//wiki.kag2d.com/wiki/DrawIconByName
DrawIconByName
2012-09-28T21:23:37Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Draws an icon added by [[AddIconToken]] using its token name.<br />
</onlyinclude><br />
<br />
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.<br />
<br />
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.<br />
<br />
This method has two variants. They both specify the token name as a string and the position to draw the icon at with a [[position2d]]i but one also specifies a scale factor for the icon as a float.<br />
<syntaxhighlight lang="cpp"><br />
void GUI::DrawIconByName( const string &iconName, position2di pos )<br />
void GUI::DrawIconByName( const string &iconName, position2di pos, f32 scale )<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting]]<br />
[[Category:Global Functions]]<br />
<br />
'''Example'''<br />
<br />
<syntaxhighlight lang="cpp"><br />
void onRender(CRules@ this)<br />
{ <br />
AddIconToken("$corpse$", "GUI/BodyIcon.png", dimension2di(32, 32), 0, SColor(255, 125, 25, 5));<br />
GUI::DrawIconByName("$corpse$", position2di(getScreenWidth()/2 - 50, getScreenHeight()/2 - 50), 2);<br />
<br />
}<br />
</syntaxhighlight><br />
<br />
[[File:GUIIcon.png]]</div>
Verrazano
//wiki.kag2d.com/wiki/File:GUIIcon.png
File:GUIIcon.png
2012-09-28T21:22:27Z
<p>Verrazano: </p>
<hr />
<div></div>
Verrazano
//wiki.kag2d.com/wiki/DrawButtonHover
DrawButtonHover
2012-09-28T21:02:13Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Draws a hover-highlighted button with a shape specified by the given [[rect]].<br />
</onlyinclude><br />
<br />
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.<br />
<br />
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.<br />
<syntaxhighlight lang="cpp"><br />
void GUI::DrawButtonHover(const recti &rect)<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting]]<br />
[[Category:Global Functions]]<br />
<br />
[[File:GUIButtonhover.png]]</div>
Verrazano
//wiki.kag2d.com/wiki/File:GUIButtonhover.png
File:GUIButtonhover.png
2012-09-28T21:02:01Z
<p>Verrazano: GUI::DrawButtonHover</p>
<hr />
<div>GUI::DrawButtonHover</div>
Verrazano
//wiki.kag2d.com/wiki/DrawButtonPressed
DrawButtonPressed
2012-09-28T21:01:04Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Draws a pressed button with a shape specified by the given [[rect]].<br />
</onlyinclude><br />
<br />
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.<br />
<br />
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.<br />
<syntaxhighlight lang="cpp"><br />
void GUI::DrawButtonPressed(const recti &rect)<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting]]<br />
[[Category:Global Functions]]<br />
<br />
[[File:GUIButtonpressed.png]]</div>
Verrazano
//wiki.kag2d.com/wiki/File:GUIButtonpressed.png
File:GUIButtonpressed.png
2012-09-28T21:00:48Z
<p>Verrazano: GUI::DrawButtonPressed</p>
<hr />
<div>GUI::DrawButtonPressed</div>
Verrazano
//wiki.kag2d.com/wiki/DrawButton
DrawButton
2012-09-28T21:00:16Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Draws a button with a shape specified by the given [[rect]].<br />
</onlyinclude><br />
<br />
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.<br />
<br />
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.<br />
<syntaxhighlight lang="cpp"><br />
void GUI::DrawButton(const recti &rect)<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting]]<br />
[[Category:Global Functions]]<br />
<br />
[[File:GUIButton.png]]</div>
Verrazano
//wiki.kag2d.com/wiki/DrawButton
DrawButton
2012-09-28T21:00:06Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Draws a button with a shape specified by the given [[rect]].<br />
</onlyinclude><br />
<br />
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.<br />
<br />
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.<br />
<syntaxhighlight lang="cpp"><br />
void GUI::DrawButton(const recti &rect)<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting]]<br />
[[Category:Global Functions]]<br />
<br />
[[File::GUIButton.png]]</div>
Verrazano
//wiki.kag2d.com/wiki/File:GUIButton.png
File:GUIButton.png
2012-09-28T20:59:51Z
<p>Verrazano: GUI::DrawButton</p>
<hr />
<div>GUI::DrawButton</div>
Verrazano
//wiki.kag2d.com/wiki/DrawFramedPane
DrawFramedPane
2012-09-28T20:59:24Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Draws a framed pane with a shape specified by the given [[rect]].<br />
</onlyinclude><br />
<br />
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.<br />
<br />
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.<br />
<syntaxhighlight lang="cpp"><br />
void GUI::DrawFramedPane(const recti &rect)<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting]]<br />
[[Category:Global Functions]]<br />
<br />
[[File:GUIFramedpane.png]]</div>
Verrazano
//wiki.kag2d.com/wiki/File:GUIFramedpane.png
File:GUIFramedpane.png
2012-09-28T20:59:03Z
<p>Verrazano: GUI::DrawFramedPane</p>
<hr />
<div>GUI::DrawFramedPane</div>
Verrazano
//wiki.kag2d.com/wiki/DrawWindow
DrawWindow
2012-09-28T20:57:18Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Draws a window with a shape specified by the given [[rect]].<br />
</onlyinclude><br />
<br />
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.<br />
<br />
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.<br />
<syntaxhighlight lang="cpp"><br />
void GUI::DrawWindow(const recti &rect)<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting]]<br />
[[Category:Global Functions]]<br />
<br />
[[File:GUIWindow.png]]</div>
Verrazano
//wiki.kag2d.com/wiki/DrawWindow
DrawWindow
2012-09-28T20:56:52Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Draws a window with a shape specified by the given [[rect]].<br />
</onlyinclude><br />
<br />
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.<br />
<br />
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.<br />
<syntaxhighlight lang="cpp"><br />
void GUI::DrawWindow(const recti &rect)<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting]]<br />
[[Category:Global Functions]]<br />
<br />
[[File::GUIWindow.png]]</div>
Verrazano
//wiki.kag2d.com/wiki/File:GUIWindow.png
File:GUIWindow.png
2012-09-28T20:56:40Z
<p>Verrazano: GUI::DrawWindow</p>
<hr />
<div>GUI::DrawWindow</div>
Verrazano
//wiki.kag2d.com/wiki/DrawSunkenPane
DrawSunkenPane
2012-09-28T20:56:06Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Draws a sunken pane with a shape specified by the given [[rect]].<br />
</onlyinclude><br />
<br />
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.<br />
<br />
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.<br />
<syntaxhighlight lang="cpp"><br />
void GUI::DrawSunkenPane(const recti &rect)<br />
</syntaxhighlight><br />
<br />
Example from Entities/Workshops/Scripts/DrawTasks.as:<br />
<syntaxhighlight lang="cpp" highlight="18"><br />
if ((getControls().getMouseScreenPos() - pos2d).getLength() < 2*this.getBlob().getRadius())<br />
{<br />
CProperties @prop = this.getBlob().getProperties();<br />
int tasksCount = prop.getScriptObjectGroupSize( "running_tasks" );<br />
for (int i = 0; i < tasksCount; i++)<br />
{<br />
WorkshopTask @task = cast<WorkshopTask@>(prop.getScriptObject( "running_tasks", i));<br />
<br />
int width = 92;<br />
int height = 32;<br />
int top = pos2d.Y - this.getBlob().getHeight();<br />
int margin = 4;<br />
recti rect( position2di(pos2d.X-width/2, top-height - i*height),<br />
position2di(pos2d.X+width/2, top - i*height) );<br />
<br />
f32 progress = float(task.timeCurrent) / float(task.timeEnd);<br />
<br />
GUI::DrawSunkenPane( rect );<br />
GUI::DrawProgressBar( recti( position2di(rect.UpperLeftCorner.X+margin, rect.UpperLeftCorner.Y+margin),<br />
position2di(rect.LowerRightCorner.X-32-margin, rect.LowerRightCorner.Y-margin) ), progress );<br />
GUI::DrawIcon( task.iconName, position2di(rect.LowerRightCorner.X-36, rect.UpperLeftCorner.Y) );<br />
} <br />
}<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting]]<br />
[[Category:Global Functions]]<br />
<br />
[[File:GUISunkenpane.png]]</div>
Verrazano
//wiki.kag2d.com/wiki/File:GUIPane.png
File:GUIPane.png
2012-09-28T20:55:27Z
<p>Verrazano: GUI::DrawPane</p>
<hr />
<div>GUI::DrawPane</div>
Verrazano
//wiki.kag2d.com/wiki/DrawPane
DrawPane
2012-09-28T20:55:09Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Draws a pane with a shape specified by the given [[rect]].<br />
</onlyinclude><br />
<br />
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.<br />
<br />
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.<br />
<syntaxhighlight lang="cpp"><br />
void GUI::DrawPane(const recti &rect)<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting]]<br />
[[Category:Global Functions]]<br />
<br />
'''Example'''<br />
<br />
<syntaxhighlight lang="cpp"><br />
void onRender(CRules@ this)<br />
{<br />
GUI::DrawPane(recti(position2di(getScreenWidth()/2-50, getScreenHeight()/2-50), dimension2di(100, 100)));<br />
}<br />
</syntaxhighlight><br />
<br />
[[File:GUIPane.png]]</div>
Verrazano
//wiki.kag2d.com/wiki/File:GUISunkenpane.png
File:GUISunkenpane.png
2012-09-28T20:54:28Z
<p>Verrazano: GUI::DrawSunkenPane</p>
<hr />
<div>GUI::DrawSunkenPane</div>
Verrazano
//wiki.kag2d.com/wiki/DrawPane
DrawPane
2012-09-28T20:36:18Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Draws a pane with a shape specified by the given [[rect]].<br />
</onlyinclude><br />
<br />
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.<br />
<br />
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.<br />
<syntaxhighlight lang="cpp"><br />
void GUI::DrawPane(const recti &rect)<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting]]<br />
[[Category:Global Functions]]<br />
<br />
'''Example'''<br />
<br />
<syntaxhighlight lang="cpp"><br />
void onRender(CRules@ this)<br />
{<br />
GUI::DrawPane(recti(position2di(getScreenWidth()/2-50, getScreenHeight()/2-50), dimension2di(100, 100)));<br />
}<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/DrawPane
DrawPane
2012-09-28T20:36:03Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Draws a pane with a shape specified by the given [[rect]].<br />
</onlyinclude><br />
<br />
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.<br />
<br />
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.<br />
<syntaxhighlight lang="cpp"><br />
void GUI::DrawPane(const recti &rect)<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting]]<br />
[[Category:Global Functions]]<br />
<br />
'''Example'''<br />
<br />
<syntaxhighlight lang="cpp"><br />
void onRender(CRules@ this){<br />
GUI::DrawPane(recti(position2di(getScreenWidth()/2-50, getScreenHeight()/2-50), dimension2di(100, 100)));<br />
}<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/DrawPane
DrawPane
2012-09-28T20:27:43Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Draws a pane with a shape specified by the given [[rect]].<br />
</onlyinclude><br />
<br />
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.<br />
<br />
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.<br />
<syntaxhighlight lang="cpp"><br />
void GUI::DrawPane(const recti &rect)<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting]]<br />
[[Category:Global Functions]]<br />
<br />
'''Example'''<br />
<br />
<syntaxhighlight lang="cpp"><br />
void onRender(CRules@ this){<br />
GUI::DrawPane(recti(position2di(getScreenWidth()/2-50, getScreenHeight()/2-50), dimension2di(100, 100)));<br />
}<br />
</syntaxhighlight><br />
<br />
[[Media:http://i.imgur.com/gp8ez.png]]</div>
Verrazano
//wiki.kag2d.com/wiki/DrawPane
DrawPane
2012-09-28T20:27:31Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Draws a pane with a shape specified by the given [[rect]].<br />
</onlyinclude><br />
<br />
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.<br />
<br />
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.<br />
<syntaxhighlight lang="cpp"><br />
void GUI::DrawPane(const recti &rect)<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting]]<br />
[[Category:Global Functions]]<br />
<br />
'''Example'''<br />
<br />
<syntaxhighlight lang="cpp"><br />
void onRender(CRules@ this){<br />
GUI::DrawPane(recti(position2di(getScreenWidth()/2-50, getScreenHeight()/2-50), dimension2di(100, 100)));<br />
}<br />
</syntaxhighlight><br />
<br />
[[[Media:http://i.imgur.com/gp8ez.png]]]</div>
Verrazano
//wiki.kag2d.com/wiki/DrawPane
DrawPane
2012-09-28T20:26:30Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Draws a pane with a shape specified by the given [[rect]].<br />
</onlyinclude><br />
<br />
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.<br />
<br />
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.<br />
<syntaxhighlight lang="cpp"><br />
void GUI::DrawPane(const recti &rect)<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting]]<br />
[[Category:Global Functions]]<br />
<br />
'''Example'''<br />
<br />
<syntaxhighlight lang="cpp"><br />
void onRender(CRules@ this){<br />
GUI::DrawPane(recti(position2di(getScreenWidth()/2-50, getScreenHeight()/2-50), dimension2di(100, 100)));<br />
}<br />
</syntaxhighlight><br />
<br />
[[http://i.imgur.com/gp8ez.png]]</div>
Verrazano
//wiki.kag2d.com/wiki/GetLocalPlayer
GetLocalPlayer
2012-09-28T06:27:53Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Returns the handle of the local CPlayer.<br />
</onlyinclude><br />
<br />
<syntaxhighlight lang="cpp"><br />
CPlayer@ getLocalPlayer()<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/Global_Functions
Global Functions
2012-09-28T06:25:49Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Global functions are functions that are globally available to be called by any script.<br />
</onlyinclude><br />
This is a list of all of the global functions provided by the KAG application (that is, not defined in a script).<br />
<br />
{| class="wikitableShiny"<br />
|-<br />
! '''Function'''<br />
! '''Description'''<br />
|-<br />
| [[AddIconMarker]]<br />
| {{:AddIconMarker}}<br />
|-<br />
| [[AddColorMarker]]<br />
| {{:AddColorMarker}}<br />
|-<br />
| [[CreateGridMenu]]<br />
| {{:CreateGridMenu}}<br />
|-<br />
| [[getPlayerByUsername]]<br />
| {{:getPlayerByUsername}}<br />
|-<br />
| [[AddBot]]<br />
| {{:AddBot}}<br />
|-<br />
| [[Play]]<br />
| {{:Play}}<br />
|-<br />
!<br />
! '''Players'''<br />
|-<br />
| [[getLocalPlayer]]<br />
| {{:getLocalPlayer}}<br />
|-<br />
!<br />
! '''Blobs''' <br />
|-<br />
| [[CreateBlob]]<br />
| {{:CreateBlob}}<br />
|-<br />
| [[getBlob]]<br />
| {{:getBlob}}<br />
|-<br />
| [[getPlayingBlob]]<br />
| {{:getPlayingBlob}}<br />
|-<br />
| [[getBlobByNetworkId]]<br />
| {{:getBlobByNetworkId}}<br />
|-<br />
| [[getBlobByName]]<br />
| {{:getBlobByName}}<br />
|-<br />
| [[populateBlobsByNameList]]<br />
| {{:populateBlobsByNameList}}<br />
|-<br />
| [[getBlobsByNameListBlob]]<br />
| {{:getBlobsByNameListBlob}}<br />
|-<br />
| [[getBlobsByNameListSize]]<br />
| {{:getBlobsByNameListSize}}<br />
|-<br />
| [[getPlayingBlobsSize]]<br />
| {{:getPlayingBlobsSize}}<br />
|-<br />
| [[getBlobSize]]<br />
| {{:getBlobSize}}<br />
|-<br />
!<br />
! '''Inventory'''<br />
|-<br />
| [[AddRequirement]]<br />
| {{:AddRequirement}}<br />
|-<br />
| [[ReadRequirement]]<br />
| {{:ReadRequirement}}<br />
|-<br />
| [[hasRequirements]]<br />
| {{:hasRequirements}}<br />
|-<br />
| [[TakeRequirementsCombined]]<br />
| {{:TakeRequirementsCombined}}<br />
|-<br />
!<br />
! '''GUI'''<br />
|-<br />
| [[LoadSkin]]<br />
| {{:LoadSkin}}<br />
|-<br />
| [[DrawPane]]<br />
| {{:DrawPane}}<br />
|-<br />
| [[DrawSunkenPane]]<br />
| {{:DrawSunkenPane}}<br />
|-<br />
| [[DrawWindow]]<br />
| {{:DrawWindow}}<br />
|-<br />
| [[DrawFramedPane]]<br />
| {{:DrawFramedPane}}<br />
|-<br />
| [[DrawButton]]<br />
| {{:DrawButton}}<br />
|-<br />
| [[DrawButtonPressed]]<br />
| {{:DrawButtonPressed}}<br />
|-<br />
| [[DrawButtonHover]]<br />
| {{:DrawButtonHover}}<br />
|-<br />
| [[DrawRectangle]]<br />
| {{:DrawRectangle}}<br />
|-<br />
| [[DrawProgressBar]]<br />
| {{:DrawProgressBar}}<br />
|-<br />
| [[DrawIconByName]]<br />
| {{:DrawIconByName}}<br />
|-<br />
| [[DrawIcon]]<br />
| {{:DrawIcon}}<br />
|-<br />
| [[DrawText]]<br />
| {{:DrawText}}<br />
|-<br />
!<br />
! '''Maths'''<br />
|-<br />
| [[Cos]]<br />
| {{:Cos}}<br />
|-<br />
| [[FastCos]]<br />
| {{:FastCos}}<br />
|-<br />
| [[ACos]]<br />
| {{:ACos}}<br />
|-<br />
| [[Sin]]<br />
| {{:Sin}}<br />
|-<br />
| [[FastSin]]<br />
| {{:FastSin}}<br />
|-<br />
| [[ASin]]<br />
| {{:ASin}}<br />
|-<br />
| [[Tan]]<br />
| {{:Tan}}<br />
|-<br />
| [[ATan]]<br />
| {{:ATan}}<br />
|-<br />
| [[Pow]]<br />
| {{:Pow}}<br />
|-<br />
| [[Sqrt]]<br />
| {{:Sqrt}}<br />
|-<br />
| [[InvSqrt]]<br />
| {{:InvSqrt}}<br />
|-<br />
| [[isValid]]<br />
| {{:isValid}}<br />
|-<br />
| [[Floor]]<br />
| {{:Floor}}<br />
|-<br />
| [[Ceil]]<br />
| {{:Ceil}}<br />
|-<br />
| [[Equals]]<br />
| {{:Equals}}<br />
|-<br />
| [[Min]]<br />
| {{:Min}}<br />
|-<br />
| [[Max]]<br />
| {{:Max}}<br />
|-<br />
| [[Abs]]<br />
| {{:Abs}}<br />
|-<br />
| [[FMod]]<br />
| {{:FMod}}<br />
|-<br />
| [[Round]]<br />
| {{:Round}}<br />
|-<br />
| [[Roundf]]<br />
| {{:Roundf}}<br />
|-<br />
| [[Random]]<br />
| {{:Random}}<br />
|-<br />
| [[FastRandom]]<br />
| {{:FastRandom}}<br />
|-<br />
!<br />
! '''Strings'''<br />
|-<br />
| [[formatInt]]<br />
| {{:formatInt}}<br />
|-<br />
| [[formatFloat]]<br />
| {{:formatFloat}}<br />
|-<br />
| [[parseInt]]<br />
| {{:parseInt}}<br />
|-<br />
| [[parseFloat]]<br />
| {{:parseFloat}}<br />
|-<br />
!<br />
! '''Printing'''<br />
|-<br />
| [[print]]<br />
| {{:print}}<br />
|-<br />
| [[printInt]]<br />
| {{:printInt}}<br />
|-<br />
| [[printFloat]]<br />
| {{:printFloat}}<br />
|-<br />
| [[printString]]<br />
| {{:printString}}<br />
|-<br />
| [[printVec2f]]<br />
| {{:printVec2f}}<br />
|-<br />
| [[printBool]]<br />
| {{:printBool}}<br />
|-<br />
| [[printPos]]<br />
| {{:printPos}}<br />
|-<br />
| [[error]]<br />
| {{:error}}<br />
|-<br />
| [[warning]]<br />
| {{:warning}}<br />
|-<br />
!<br />
! '''World'''<br />
|-<br />
| [[LoadRules]]<br />
| {{:LoadRules}}<br />
|-<br />
| [[LoadMap]]<br />
| {{:LoadMap}}<br />
|-<br />
| [[LoadNextMap]]<br />
| {{:LoadNextMap}}<br />
|-<br />
| [[LoadMapCycle]]<br />
| {{:LoadMapCycle}}<br />
|-<br />
| [[LoadSeclevs]]<br />
| {{:LoadSeclevs}}<br />
|-<br />
| [[getGameTime]]<br />
| {{:getGameTime}}<br />
|-<br />
| [[getFontHeight]]<br />
| {{:getFontHeight}}<br />
|-<br />
| [[getScreenHeight]]<br />
| {{:getScreenHeight}}<br />
|-<br />
| [[getScreenWidth]]<br />
| {{:getScreenWidth}}<br />
|-<br />
| [[isPlayerListShowing]]<br />
| {{:isPlayerListShowing}}<br />
|-<br />
| [[drawRulesFont]]<br />
| {{:drawRulesFont}}<br />
|-<br />
| [[setHelpText]]<br />
| {{:setHelpText}}<br />
|-<br />
| [[getTicksASecond]]<br />
| {{:getTicksASecond}}<br />
|-<br />
!<br />
! '''Singletons'''<br />
|-<br />
| [[getMap]]<br />
| {{:getMap}}<br />
|-<br />
| [[getRules]]<br />
| {{:getRules}}<br />
|-<br />
| [[getRespawn]]<br />
| {{:getRespawn}}<br />
|-<br />
| [[getHUD]]<br />
| {{:getHUD}}<br />
|-<br />
| [[getNet]]<br />
| {{:getNet}}<br />
|-<br />
| [[getSecurity]]<br />
| {{:getSecurity}}<br />
|-<br />
| [[getCamera]]<br />
| {{:getCamera}}<br />
|-<br />
| [[getControls]]<br />
| {{:getControls}}<br />
|-<br />
| [[getDriver]]<br />
| {{:getDriver}}<br />
|-<br />
!<br />
! '''Particles'''<br />
|-<br />
| [[MakeCoin]]<br />
| {{:MakeCoin}}<br />
|-<br />
| [[ParticleAnimated]]<br />
| {{:ParticleAnimated}}<br />
|-<br />
| [[ParticlePixel]]<br />
| {{:ParticlePixel}}<br />
|-<br />
| [[ParticleBlood]]<br />
| {{:ParticleBlood}}<br />
|-<br />
| [[ParticleSpark]]<br />
| {{:ParticleSpark}}<br />
|-<br />
| [[ParticleBloodSplat]]<br />
| {{:ParticleBloodSplat}}<br />
|-<br />
| [[ParticleZombieLightning]]<br />
| {{:ParticleZombieLightning}}<br />
|-<br />
|}<br />
<br />
[[Category:Scripting]]</div>
Verrazano
//wiki.kag2d.com/wiki/GetLocalPlayer
GetLocalPlayer
2012-09-28T06:19:25Z
<p>Verrazano: Created page with "Used to get the handle to the local player's blob."</p>
<hr />
<div>Used to get the handle to the local player's blob.</div>
Verrazano
//wiki.kag2d.com/wiki/Global_Functions
Global Functions
2012-09-28T06:18:46Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
Global functions are functions that are globally available to be called by any script.<br />
</onlyinclude><br />
This is a list of all of the global functions provided by the KAG application (that is, not defined in a script).<br />
<br />
{| class="wikitableShiny"<br />
|-<br />
! '''Function'''<br />
! '''Description'''<br />
|-<br />
| [[AddIconMarker]]<br />
| {{:AddIconMarker}}<br />
|-<br />
| [[AddColorMarker]]<br />
| {{:AddColorMarker}}<br />
|-<br />
| [[CreateGridMenu]]<br />
| {{:CreateGridMenu}}<br />
|-<br />
| [[getPlayerByUsername]]<br />
| {{:getPlayerByUsername}}<br />
|-<br />
| [[AddBot]]<br />
| {{:AddBot}}<br />
|-<br />
| [[Play]]<br />
| {{:Play}}<br />
|-<br />
!<br />
! '''Blobs''' <br />
|-<br />
| [[CreateBlob]]<br />
| {{:CreateBlob}}<br />
|-<br />
| [[getBlob]]<br />
| {{:getBlob}}<br />
|-<br />
| [[getPlayingBlob]]<br />
| {{:getPlayingBlob}}<br />
|-<br />
| [[getLocalPlayer]]<br />
| {{:getLocalPlayer}}<br />
|-<br />
| [[getBlobByNetworkId]]<br />
| {{:getBlobByNetworkId}}<br />
|-<br />
| [[getBlobByName]]<br />
| {{:getBlobByName}}<br />
|-<br />
| [[populateBlobsByNameList]]<br />
| {{:populateBlobsByNameList}}<br />
|-<br />
| [[getBlobsByNameListBlob]]<br />
| {{:getBlobsByNameListBlob}}<br />
|-<br />
| [[getBlobsByNameListSize]]<br />
| {{:getBlobsByNameListSize}}<br />
|-<br />
| [[getPlayingBlobsSize]]<br />
| {{:getPlayingBlobsSize}}<br />
|-<br />
| [[getBlobSize]]<br />
| {{:getBlobSize}}<br />
|-<br />
!<br />
! '''Inventory'''<br />
|-<br />
| [[AddRequirement]]<br />
| {{:AddRequirement}}<br />
|-<br />
| [[ReadRequirement]]<br />
| {{:ReadRequirement}}<br />
|-<br />
| [[hasRequirements]]<br />
| {{:hasRequirements}}<br />
|-<br />
| [[TakeRequirementsCombined]]<br />
| {{:TakeRequirementsCombined}}<br />
|-<br />
!<br />
! '''GUI'''<br />
|-<br />
| [[LoadSkin]]<br />
| {{:LoadSkin}}<br />
|-<br />
| [[DrawPane]]<br />
| {{:DrawPane}}<br />
|-<br />
| [[DrawSunkenPane]]<br />
| {{:DrawSunkenPane}}<br />
|-<br />
| [[DrawWindow]]<br />
| {{:DrawWindow}}<br />
|-<br />
| [[DrawFramedPane]]<br />
| {{:DrawFramedPane}}<br />
|-<br />
| [[DrawButton]]<br />
| {{:DrawButton}}<br />
|-<br />
| [[DrawButtonPressed]]<br />
| {{:DrawButtonPressed}}<br />
|-<br />
| [[DrawButtonHover]]<br />
| {{:DrawButtonHover}}<br />
|-<br />
| [[DrawRectangle]]<br />
| {{:DrawRectangle}}<br />
|-<br />
| [[DrawProgressBar]]<br />
| {{:DrawProgressBar}}<br />
|-<br />
| [[DrawIconByName]]<br />
| {{:DrawIconByName}}<br />
|-<br />
| [[DrawIcon]]<br />
| {{:DrawIcon}}<br />
|-<br />
| [[DrawText]]<br />
| {{:DrawText}}<br />
|-<br />
!<br />
! '''Maths'''<br />
|-<br />
| [[Cos]]<br />
| {{:Cos}}<br />
|-<br />
| [[FastCos]]<br />
| {{:FastCos}}<br />
|-<br />
| [[ACos]]<br />
| {{:ACos}}<br />
|-<br />
| [[Sin]]<br />
| {{:Sin}}<br />
|-<br />
| [[FastSin]]<br />
| {{:FastSin}}<br />
|-<br />
| [[ASin]]<br />
| {{:ASin}}<br />
|-<br />
| [[Tan]]<br />
| {{:Tan}}<br />
|-<br />
| [[ATan]]<br />
| {{:ATan}}<br />
|-<br />
| [[Pow]]<br />
| {{:Pow}}<br />
|-<br />
| [[Sqrt]]<br />
| {{:Sqrt}}<br />
|-<br />
| [[InvSqrt]]<br />
| {{:InvSqrt}}<br />
|-<br />
| [[isValid]]<br />
| {{:isValid}}<br />
|-<br />
| [[Floor]]<br />
| {{:Floor}}<br />
|-<br />
| [[Ceil]]<br />
| {{:Ceil}}<br />
|-<br />
| [[Equals]]<br />
| {{:Equals}}<br />
|-<br />
| [[Min]]<br />
| {{:Min}}<br />
|-<br />
| [[Max]]<br />
| {{:Max}}<br />
|-<br />
| [[Abs]]<br />
| {{:Abs}}<br />
|-<br />
| [[FMod]]<br />
| {{:FMod}}<br />
|-<br />
| [[Round]]<br />
| {{:Round}}<br />
|-<br />
| [[Roundf]]<br />
| {{:Roundf}}<br />
|-<br />
| [[Random]]<br />
| {{:Random}}<br />
|-<br />
| [[FastRandom]]<br />
| {{:FastRandom}}<br />
|-<br />
!<br />
! '''Strings'''<br />
|-<br />
| [[formatInt]]<br />
| {{:formatInt}}<br />
|-<br />
| [[formatFloat]]<br />
| {{:formatFloat}}<br />
|-<br />
| [[parseInt]]<br />
| {{:parseInt}}<br />
|-<br />
| [[parseFloat]]<br />
| {{:parseFloat}}<br />
|-<br />
!<br />
! '''Printing'''<br />
|-<br />
| [[print]]<br />
| {{:print}}<br />
|-<br />
| [[printInt]]<br />
| {{:printInt}}<br />
|-<br />
| [[printFloat]]<br />
| {{:printFloat}}<br />
|-<br />
| [[printString]]<br />
| {{:printString}}<br />
|-<br />
| [[printVec2f]]<br />
| {{:printVec2f}}<br />
|-<br />
| [[printBool]]<br />
| {{:printBool}}<br />
|-<br />
| [[printPos]]<br />
| {{:printPos}}<br />
|-<br />
| [[error]]<br />
| {{:error}}<br />
|-<br />
| [[warning]]<br />
| {{:warning}}<br />
|-<br />
!<br />
! '''World'''<br />
|-<br />
| [[LoadRules]]<br />
| {{:LoadRules}}<br />
|-<br />
| [[LoadMap]]<br />
| {{:LoadMap}}<br />
|-<br />
| [[LoadNextMap]]<br />
| {{:LoadNextMap}}<br />
|-<br />
| [[LoadMapCycle]]<br />
| {{:LoadMapCycle}}<br />
|-<br />
| [[LoadSeclevs]]<br />
| {{:LoadSeclevs}}<br />
|-<br />
| [[getGameTime]]<br />
| {{:getGameTime}}<br />
|-<br />
| [[getFontHeight]]<br />
| {{:getFontHeight}}<br />
|-<br />
| [[getScreenHeight]]<br />
| {{:getScreenHeight}}<br />
|-<br />
| [[getScreenWidth]]<br />
| {{:getScreenWidth}}<br />
|-<br />
| [[isPlayerListShowing]]<br />
| {{:isPlayerListShowing}}<br />
|-<br />
| [[drawRulesFont]]<br />
| {{:drawRulesFont}}<br />
|-<br />
| [[setHelpText]]<br />
| {{:setHelpText}}<br />
|-<br />
| [[getTicksASecond]]<br />
| {{:getTicksASecond}}<br />
|-<br />
!<br />
! '''Singletons'''<br />
|-<br />
| [[getMap]]<br />
| {{:getMap}}<br />
|-<br />
| [[getRules]]<br />
| {{:getRules}}<br />
|-<br />
| [[getRespawn]]<br />
| {{:getRespawn}}<br />
|-<br />
| [[getHUD]]<br />
| {{:getHUD}}<br />
|-<br />
| [[getNet]]<br />
| {{:getNet}}<br />
|-<br />
| [[getSecurity]]<br />
| {{:getSecurity}}<br />
|-<br />
| [[getCamera]]<br />
| {{:getCamera}}<br />
|-<br />
| [[getControls]]<br />
| {{:getControls}}<br />
|-<br />
| [[getDriver]]<br />
| {{:getDriver}}<br />
|-<br />
!<br />
! '''Particles'''<br />
|-<br />
| [[MakeCoin]]<br />
| {{:MakeCoin}}<br />
|-<br />
| [[ParticleAnimated]]<br />
| {{:ParticleAnimated}}<br />
|-<br />
| [[ParticlePixel]]<br />
| {{:ParticlePixel}}<br />
|-<br />
| [[ParticleBlood]]<br />
| {{:ParticleBlood}}<br />
|-<br />
| [[ParticleSpark]]<br />
| {{:ParticleSpark}}<br />
|-<br />
| [[ParticleBloodSplat]]<br />
| {{:ParticleBloodSplat}}<br />
|-<br />
| [[ParticleZombieLightning]]<br />
| {{:ParticleZombieLightning}}<br />
|-<br />
|}<br />
<br />
[[Category:Scripting]]</div>
Verrazano
//wiki.kag2d.com/wiki/String
String
2012-09-28T05:06:44Z
<p>Verrazano: Created page with "String is used for storing strings of characters. <syntaxhighlight lang="cpp"> string s = "hello world" </syntaxhighlight>"</p>
<hr />
<div>String is used for storing strings of characters.<br />
<br />
<syntaxhighlight lang="cpp"><br />
string s = "hello world"<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/Position2d
Position2d
2012-09-28T05:05:37Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
The Position2d type is used for positioning GUI elements.<br />
</onlyinclude><br />
<br />
<syntaxhighlight lang="cpp"><br />
position2di( const uint, const uint )<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/Position2d
Position2d
2012-09-28T05:05:28Z
<p>Verrazano: Created page with "<onlyinclude> The Position2d type is used for positioning GUI elements. </onlyinclude> <syntaxhighlight lang="cpp> position2di( const uint, const uint ) </syntaxhighlight>"</p>
<hr />
<div><onlyinclude><br />
The Position2d type is used for positioning GUI elements.<br />
</onlyinclude><br />
<br />
<syntaxhighlight lang="cpp><br />
position2di( const uint, const uint )<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/Dimension2d
Dimension2d
2012-09-28T05:04:01Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
The Dimension2d type is used for setting the dimensions of things such as GUI elements.<br />
</onlyinclude><br />
<br />
<syntaxhighlight lang="cpp"><br />
dimension2di dim ( const uint, const uint )<br />
</syntaxhighlight><br />
<br />
'''Example'''<br />
<syntaxhighlight lang="cpp"><br />
GUI::DrawWindow(recti(position2di(pos.x, pos.y), dimension2di(50, 70)));<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/Vec2f
Vec2f
2012-09-28T05:03:11Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
The Vec2f type is mainly used in the blob for positioning and getting the mouse coordinates. <br />
<br />
Vec2f contains two variables '''x''' and '''y'''.<br />
<br />
<syntaxhighlight lang="cpp"><br />
Vec2f pos ( f32, f32 )<br />
</syntaxhighlight><br />
<br />
'''Example'''<br />
<br />
<syntaxhighlight lang="cpp"><br />
Vec2f pos;<br />
pos = this.getPosition();<br />
pos+50;<br />
this.SetPosition(pos);<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/Rect
Rect
2012-09-28T05:02:43Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
The recti type is used to create GUI elements among other things. There are two variances.<br />
</onlyinclude><br />
<br />
<br />
Method one uses a position2di and dimension2di argument. The dimension2di argument represents the width and the height;<br />
<syntaxhighlight lang="cpp"><br />
recti rect ( position2di, dimension2di);<br />
</syntaxhighlight><br />
<br />
<br />
Method two uses two position2di arguments. The first being the upper left hand corner and the second being the lower right hand corner. ( needs clarification. )<br />
<syntaxhighlight lang="cpp"><br />
recti rect ( position2di, position2di);<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/Dimension2d
Dimension2d
2012-09-28T05:01:36Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
The Dimension2d types are used for positioning things such as GUI elements. It is similar to the Vec2f type, but takes unsigned integers. <br />
</onlyinclude><br />
<br />
<syntaxhighlight lang="cpp"><br />
dimension2di dim ( const uint, const uint )<br />
</syntaxhighlight><br />
<br />
'''Example'''<br />
<syntaxhighlight lang="cpp"><br />
GUI::DrawWindow(recti(position2di(pos.x, pos.y), dimension2di(50, 70)));<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/Dimension2d
Dimension2d
2012-09-28T05:01:22Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
The Dimension2d types are used for positioning things such as GUI elements. It is similar to the Vec2f type, but takes unsigned integers. <br />
</onlyinclude><br />
<br />
<syntaxhighlight lang="cpp><br />
dimension2di dim ( const uint, const uint )<br />
</syntaxhighlight><br />
<br />
'''Example'''<br />
<syntaxhighlight lang="cpp"><br />
GUI::DrawWindow(recti(position2di(pos.x, pos.y), dimension2di(50, 70)));<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/Vec2f
Vec2f
2012-09-28T04:59:54Z
<p>Verrazano: Created page with "<onlyinclude> The Vec2f type is mainly used in the blob for positioning and getting the mouse coordinates. Vec2f contains two variables '''x''' and '''y'''. <syntaxhighlight l..."</p>
<hr />
<div><onlyinclude><br />
The Vec2f type is mainly used in the blob for positioning and getting the mouse coordinates. <br />
<br />
Vec2f contains two variables '''x''' and '''y'''.<br />
<br />
<syntaxhighlight lang="cpp"><br />
Vec2f pos ( 25, 25 )<br />
</syntaxhighlight><br />
<br />
'''Example'''<br />
<br />
<syntaxhighlight lang="cpp"><br />
Vec2f pos;<br />
pos = this.getPosition();<br />
pos+50;<br />
this.SetPosition(pos);<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/SColor
SColor
2012-09-28T04:54:50Z
<p>Verrazano: Created page with "The SColor type is used in GUI functions such as DrawRectangle. <syntaxhighlight lang="cpp"> SColor color ( const uint, const uint, const uint, const uint ) </syntaxhighlight> ..."</p>
<hr />
<div>The SColor type is used in GUI functions such as DrawRectangle.<br />
<br />
<syntaxhighlight lang="cpp"><br />
SColor color ( const uint, const uint, const uint, const uint )<br />
</syntaxhighlight><br />
<br />
'''Example'''<br />
<br />
<syntaxhighlight lang="cpp"><br />
GUI::DrawRectangle(rect, SColor(255, 25, 25, 25, 0));<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/Rect
Rect
2012-09-28T04:50:33Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
The recti type is used to create GUI elements among other things. There are two variances.<br />
</onlyinclude><br />
<br />
<br />
Method one uses a position2di and dimension2di argument. The dimension2di argument represents the width and the height;<br />
<syntaxhighlight lang="cpp"><br />
recti rect (position2di(pos.x, pos.y), dimension2di(50, 70));<br />
</syntaxhighlight><br />
<br />
<br />
Method two uses two position2di arguments. The first being the upper left hand corner and the second being the lower right hand corner. ( needs clarification. )<br />
<syntaxhighlight lang="cpp"><br />
recti rect (position2di(pos.x, pos.y), position2di(pos.x + 50, pos.y + 70));<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/Rect
Rect
2012-09-28T04:49:25Z
<p>Verrazano: </p>
<hr />
<div>The recti type is used to create GUI elements among other things. There are two variances.<br />
<br />
Method one uses a position2di and dimension2di argument. The dimension2di argument represents the width and the height;<br />
<syntaxhighlight lang="cpp"><br />
recti rect (position2di(pos.x, pos.y), dimension2di(50, 70));<br />
</syntaxhighlight><br />
<br />
Method two uses two position2di arguments. The first being the upper left hand corner and the second being the lower right hand corner. ( needs clarification. )<br />
<br />
<syntaxhighlight lang="cpp"><br />
recti rect (position2di(pos.x, pos.y), position2di(pos.x + 50, pos.y + 70));<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/Rect
Rect
2012-09-28T04:48:55Z
<p>Verrazano: Created page with "Used to create GUI elements among other things. There are two variances. Method one uses a position2di and dimension2di argument. The dimension2di argument represents the width ..."</p>
<hr />
<div>Used to create GUI elements among other things. There are two variances.<br />
<br />
Method one uses a position2di and dimension2di argument. The dimension2di argument represents the width and the height;<br />
<syntaxhighlight lang="cpp"><br />
recti rect (position2di(pos.x, pos.y), dimension2di(50, 70));<br />
</syntaxhighlight><br />
<br />
Method two uses two position2di arguments. The first being the upper left hand corner and the second being the lower right hand corner. ( needs clarification. )<br />
<br />
<syntaxhighlight lang="cpp"><br />
recti rect (position2di(pos.x, pos.y), position2di(pos.x + 50, pos.y + 70));<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/Dimension2d
Dimension2d
2012-09-28T04:42:47Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
The Dimension2d types are used for positioning things such as GUI elements. It is similar to the Vec2f type, but takes unsigned integers. <br />
</onlyinclude><br />
<br />
{| class="wikitableShiny" border="1"<br />
|-<br />
! '''Types'''<br />
! '''Description'''<br />
|-<br />
| [[dimension2di]]<br />
| [[dimension2di ( const uint, const uint )]]<br />
|-<br />
| [[position2di]]<br />
| [[position2di ( const uint, const uint )]]<br />
|-<br />
|}<br />
<br />
'''Example'''<br />
<syntaxhighlight lang="cpp"><br />
GUI::DrawWindow(recti(position2di(pos.x, pos.y), dimension2di(50, 70)));<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/Dimension2d
Dimension2d
2012-09-28T04:41:44Z
<p>Verrazano: </p>
<hr />
<div><onlyinclude><br />
The Dimension2d types are used for positioning things such as GUI elements. It is similar to the Vec2f type, but takes unsigned integers. <br />
</onlyinclude><br />
<br />
{| class="wikitableShiny" border="1"<br />
|-<br />
! '''Types'''<br />
! '''Description'''<br />
|-<br />
| {{:dimension2di}}<br />
| {{:dimension2di ( const uint, const uint )}}<br />
|-<br />
| {{:position2di}}<br />
| {{:position2di ( const uint, const uint )}}<br />
|-<br />
|}<br />
<br />
'''Example'''<br />
<syntaxhighlight lang="cpp"><br />
GUI::DrawWindow(recti(position2di(pos.x, pos.y), dimension2di(50, 70)));<br />
</syntaxhighlight></div>
Verrazano
//wiki.kag2d.com/wiki/Dimension2d
Dimension2d
2012-09-28T04:40:10Z
<p>Verrazano: Created page with "<onlyinclude> The Dimension2d types are used for positioning elements such as GUI elements. It is similar to the Vec2f but takes unsigned integers. </onlyinclude> {| class="wik..."</p>
<hr />
<div><onlyinclude><br />
The Dimension2d types are used for positioning elements such as GUI elements. It is similar to the Vec2f but takes unsigned integers. <br />
</onlyinclude><br />
<br />
{| class="wikitableShiny" border="1"<br />
|-<br />
! '''Types'''<br />
! '''Description'''<br />
|-<br />
| [[dimension2di]]<br />
| [[dimension2di ( const uint, const uint )]]<br />
|-<br />
| [[position2di]]<br />
| [[position2di ( const uint, const uint )]]<br />
|-<br />
|}<br />
<br />
'''Example'''<br />
<syntaxhighlight lang="cpp"><br />
GUI::DrawWindow(recti(position2di(pos.x, pos.y), dimension2di(50, 70)));<br />
</syntaxhighlight></div>
Verrazano