https://wiki.gideros.rocks/api.php?action=feedcontributions&user=PaulR&feedformat=atomGiderosMobile - User contributions [en-gb]2024-03-28T11:17:40ZUser contributionsMediaWiki 1.35.11https://wiki.gideros.rocks/index.php?title=AlertDialog&diff=12969AlertDialog2018-11-28T11:58:42Z<p>PaulR: /* Examples */ fix quote HTML tags</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:AlertDialog --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/><br />
'''<translate>Available since</translate>:''' Gideros 2012.8<br/><br />
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
The [[Special:MyLanguage/AlertDialog|AlertDialog]] class is used to display native alert dialogs with one, two or three buttons. Cancel button<br /><br />
is mandatory but other two buttons are optional. When the user presses any button in the alert dialog,<br /><br />
it&#039;s dismissed and [[Special:MyLanguage/Event.COMPLETE|Event.COMPLETE]] event is dispatched.<br /><br />
<br /><br />
<br />
If alert dialog is dismissed by any other means (by pressing back button on Android or by pressing close button on desktop), it behaves as cancel button is pressed.<br /><br />
<br /></translate><br />
=== <translate>Examples</translate> ===<br />
'''Example'''<br/><br />
<source lang="lua">local alertDialog = AlertDialog.new("This is my title", "And my message", "Cancel", "Yes", "No")<br />
<br />
local function onComplete(event)<br />
print(event.buttonIndex, event.buttonText)<br />
end<br />
<br />
alertDialog:addEventListener(Event.COMPLETE, onComplete)<br />
alertDialog:show()</source><br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/AlertDialog.new|AlertDialog.new]] <br/><!-- GIDEROSMTD:AlertDialog.new(title,message,cancelButton,button1,button2) --><br />
[[Special:MyLanguage/AlertDialog:hide|AlertDialog:hide]] <br/><!-- GIDEROSMTD:AlertDialog:hide() --><br />
[[Special:MyLanguage/AlertDialog:show|AlertDialog:show]] <br/><!-- GIDEROSMTD:AlertDialog:show() --><br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Events</translate> ===<br />
[[Special:MyLanguage/Event.COMPLETE|Event.COMPLETE]]<br/><!-- GIDEROSEVT:Event.COMPLETE complete--><br />
=== <translate>Constants</translate> ===<br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=B2.ParticleSystem:createParticleGroup&diff=12950B2.ParticleSystem:createParticleGroup2018-11-19T17:25:15Z<p>PaulR: </p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate>Create group of multiple particles with same properties, that can be defined in table with:<br />
"flags"<br />
"groupFlags"<br />
"position"<br />
"angle"<br />
"linearVelocity"<br />
"angularVelocity"<br />
"color"<br />
"alpha"<br />
"strength"<br />
"shape"<br />
"lifetime"</translate><br />
<source lang="lua"><br />
b2.ParticleSystem:createParticleGroup(particleGroupDef)<br />
</source><br />
=== <translate>Parameters</translate> ===<br />
'''particleGroupDef''': (table) <translate>table with particle group data</translate> <br/></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Texture.new&diff=12946Texture.new2018-11-09T21:20:28Z<p>PaulR: </p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/Texture|Texture]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Creates a new Texture object.<br /><br />
<br /></translate><br />
<source lang="lua"><br />
Texture.new(filename,filtering,options)<br />
</source><br />
=== <translate>Parameters</translate> ===<br />
'''filename''': (string) <translate>The name of the texture file to be loaded.</translate> <br/><br />
'''filtering''': (boolean, default = false) <translate>Whether or not the texture is filtered.</translate> <br/><br />
'''options''': (table, optional) <translate>A table that specifies optional paramaters. Currently, "transparentColor", "wrap", "format" and "extend" fields are supported.</translate> '''optional'''<br/><br />
=== <translate>Examples</translate> ===<br />
'''Example'''<br/><br />
<source lang="lua">local texture = Texture.new("image.png", false, {transparentColor = 0xff00ff}) -- do not filter and make the color 0xff00ff transparent<br />
local texture = Texture.new("image.png", true, {wrap = Texture.REPEAT}) -- enable filtering and repeat the texture</source><br />
__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2016.08<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/Texture|Texture]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate>Create a texture from pixel data.</translate><br />
<source lang="lua"><br />
Texture.new(pixels, width, height, filtering, options)<br />
</source><br />
=== <translate>Parameters</translate> ===<br />
'''pixels''': (string) <translate>A string containing actual R,G,B,A compoents of each pixel in the new texture. Each component is stored as a byte. You can pass nil if you don't need to initialize texture content</translate> <br/><br />
'''width''': (number) <translate>width of the texture to create</translate> <br/><br />
'''height''': (number) <translate>Height of the texture to create</translate> <br/><br />
'''filtering''': (boolean, default to false) <translate>indicate that the texture should be filtered</translate> '''optional'''<br/><br />
'''options''': (table, optional) <translate>A table that specifies optional paramaters. Currently, "transparentColor", "wrap", "format" and "extend" fields are supported.</translate> '''optional'''<br/><br />
=== <translate>Examples</translate> ===<br />
'''Example'''<br/><br />
<source lang="lua">local texture = Texture.new(nil,300,400;, false, {extend=false}) -- Create a 300x400 empty texture. Prevent gideros from extending the texture to the next power of two size</source></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Bitmap.new&diff=12945Bitmap.new2018-11-07T10:48:42Z<p>PaulR: /* Examples */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/Bitmap|Bitmap]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Creates a new [[Special:MyLanguage/Bitmap|Bitmap]] object.<br /><br />
<br /><br />
<br /></translate><br />
<source lang="lua"><br />
Bitmap.new(texture)<br />
</source><br />
=== <translate>Parameters</translate> ===<br />
'''texture''': (TextureBase or TextureRegion) <translate></translate> <br/><br />
=== <translate>Examples</translate> ===<br />
'''Example'''<br/><br />
<source lang="lua">local texture = Texture.new("image.png")<br />
<br />
local region = TextureRegion.new(texture, 0, 0, 100, 50)<br />
<br />
local bitmap1 = Bitmap.new(texture)<br />
local bitmap2 = Bitmap.new(region)<br />
<br />
stage:addChild(bitmap1)<br />
stage:addChild(bitmap2)</source></div>PaulRhttps://wiki.gideros.rocks/index.php?title=TTFont.new&diff=12940TTFont.new2018-11-05T10:11:47Z<p>PaulR: </p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/TTFont|TTFont]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Creates a new [[Special:MyLanguage/TTFont|TTFont]] object.<br /><br />
<br /><br />
Starting from gideros 2017.9, 'text' optional parameter can be the empty string, in which case Gideros will automatically cache characters as they are used.<br />
<br /><br /><br />
<br />
Also, 2017.9 allows filename to be a table of several file names and associated size factor. <br />
Two forms are accepted: {"font1.ttf","font2.ttf",..} or {{file="font1.ttf", sizeMult=1},{file="font2.ttf", sizeMult=1.1},...}.<br />
Characters will be looked up in each file in sequence until a glyph is found.</translate><br />
<source lang="lua"><br />
TTFont.new(filename,size,text,filtering,outlineSize)<br />
</source><br />
=== <translate>Parameters</translate> ===<br />
'''filename''': (string) <translate>The name of the TTF file to be loaded</translate> <br/><br />
'''size''': (number) <translate>size of the font</translate> <br/><br />
'''text''': (string, optional) <translate>if specified, TTFont caches the characters of specified text to speed up the rendering</translate> <br/><br />
'''filtering''': (boolean, default = false) <translate>Whether or not the font texture is filtered</translate> '''optional'''<br/><br />
'''outlineSize''': (number) <translate>If set, the font will be rendered with an outline of the given size</translate> '''optional'''<br/></div>PaulRhttps://wiki.gideros.rocks/index.php?title=TTFont.new&diff=12939TTFont.new2018-11-05T10:11:33Z<p>PaulR: </p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/TTFont|TTFont]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Creates a new [[Special:MyLanguage/TTFont|TTFont]] object.<br /><br />
<br /><br />
Starting from gideros 2017.9, 'text' optional parameter can be the empty string, in which case Gideros will automatically cache characters as they are used.<br />
<br /><br />
<br />
Also, 2017.9 allows filename to be a table of several file names and associated size factor. <br />
Two forms are accepted: {"font1.ttf","font2.ttf",..} or {{file="font1.ttf", sizeMult=1},{file="font2.ttf", sizeMult=1.1},...}.<br />
Characters will be looked up in each file in sequence until a glyph is found.</translate><br />
<source lang="lua"><br />
TTFont.new(filename,size,text,filtering,outlineSize)<br />
</source><br />
=== <translate>Parameters</translate> ===<br />
'''filename''': (string) <translate>The name of the TTF file to be loaded</translate> <br/><br />
'''size''': (number) <translate>size of the font</translate> <br/><br />
'''text''': (string, optional) <translate>if specified, TTFont caches the characters of specified text to speed up the rendering</translate> <br/><br />
'''filtering''': (boolean, default = false) <translate>Whether or not the font texture is filtered</translate> '''optional'''<br/><br />
'''outlineSize''': (number) <translate>If set, the font will be rendered with an outline of the given size</translate> '''optional'''<br/></div>PaulRhttps://wiki.gideros.rocks/index.php?title=TTFont.new&diff=12938TTFont.new2018-11-05T10:11:14Z<p>PaulR: </p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/TTFont|TTFont]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Creates a new [[Special:MyLanguage/TTFont|TTFont]] object.<br /><br />
<br /><br />
Starting from gideros 2017.9, 'text' optional parameter can be the empty string, in which case Gideros will automatically cache characters as they are used.<br />
<br /><br />
Also, 2017.9 allows filename to be a table of several file names and associated size factor. <br />
Two forms are accepted: {"font1.ttf","font2.ttf",..} or {{file="font1.ttf", sizeMult=1},{file="font2.ttf", sizeMult=1.1},...}.<br />
Characters will be looked up in each file in sequence until a glyph is found.</translate><br />
<source lang="lua"><br />
TTFont.new(filename,size,text,filtering,outlineSize)<br />
</source><br />
=== <translate>Parameters</translate> ===<br />
'''filename''': (string) <translate>The name of the TTF file to be loaded</translate> <br/><br />
'''size''': (number) <translate>size of the font</translate> <br/><br />
'''text''': (string, optional) <translate>if specified, TTFont caches the characters of specified text to speed up the rendering</translate> <br/><br />
'''filtering''': (boolean, default = false) <translate>Whether or not the font texture is filtered</translate> '''optional'''<br/><br />
'''outlineSize''': (number) <translate>If set, the font will be rendered with an outline of the given size</translate> '''optional'''<br/></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Application:getDeviceInfo&diff=12937Application:getDeviceInfo2018-11-02T16:28:44Z<p>PaulR: /* Description */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Returns information about device.<br /><br />
<br /><br />
- For iOS, returns 5 values: "iOS", iOS version, device type, user interface idiom and device model<br /><br />
- For Android, returns 4 values: "Android", Android version, manufacturer and model information<br /><br />
- For Windows returns 1 value: "Windows"<br /><br />
- For Mac OS X returns 1 value: "Mac OS"<br /><br />
- For Win32 returns 1 value: "Win32"<br /><br />
- For HTML5 returns 2 values: "Web", Browser ID string<br /><br />
<br /><br />
<br />
==== iOS values ====<br />
1st value -> "iOS"<br/><br />
2nd value -> [[UIDevice currentDevice] systemVersion]<br/><br />
3rd value -> [[UIDevice currentDevice] model]<br/><br />
4th value -> UI_USER_INTERFACE_IDIOM() (as "iPhone" or "iPad")<br/><br />
5th value -> hw.machine. <br/><br />
<br/><br />
Here are the possibilities:<br/><br />
iPhone1,1 -> iPhone 1G, M68<br/><br />
iPhone1,2 -> iPhone 3G, N82<br/><br />
iPhone2,1 -> iPhone 3GS, N88<br/><br />
iPhone3,1 -> iPhone 4/AT&T, N89<br/><br />
iPhone3,2 -> iPhone 4/Other Carrier?, ??<br/><br />
iPhone3,3 -> iPhone 4/Verizon, TBD<br/><br />
iPhone4,1 -> (iPhone 4S/GSM), TBD<br/><br />
iPhone4,2 -> (iPhone 4S/CDMA), TBD<br/><br />
iPhone4,3 -> (iPhone 4S/???)<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
<br/><br />
iPod1,1 -> iPod touch 1G, N45<br/><br />
iPod2,1 -> iPod touch 2G, N72<br/><br />
iPod2,2 -> Unknown, ??<br/><br />
iPod3,1 -> iPod touch 3G, N18<br/><br />
iPod4,1 -> iPod touch 4G, N80<br/><br />
<br/><br />
iPad1,1 -> iPad 1G, WiFi and 3G, K48<br/><br />
iPad2,1 -> iPad 2G, WiFi, K93<br/><br />
iPad2,2 -> iPad 2G, GSM 3G, K94<br/><br />
iPad2,3 -> iPad 2G, CDMA 3G, K95<br/><br />
iPad3,1 -> (iPad 3G, WiFi)<br/><br />
iPad3,2 -> (iPad 3G, GSM)<br/><br />
iPad3,3 -> (iPad 3G, CDMA)<br/><br />
iPad4,1 -> (iPad 4G, WiFi)<br/><br />
iPad4,2 -> (iPad 4G, GSM)<br/><br />
iPad4,3 -> (iPad 4G, CDMA)<br/><br />
<br/><br />
i386, x86_64 -> iPhone Simulator<br/><br />
<br/><br />
<br />
==== Android values ====<br />
1st value -> "Android"<br/><br />
2nd value -> android.os.Build.VERSION.SDK_INT<br/><br />
3rd value -> android.os.Build.MANUFACTURER<br/><br />
4th value -> android.os.Build.MODEL</translate><br/><br />
<source lang="lua"><br />
(varies) = Application:getDeviceInfo()<br />
</source><br />
<br/><br />
<br />
=== <translate>Return values</translate> ===<br />
'''<translate>Returns</translate>''' (varies) <translate>Information about device, returned informations varies depending on platform</translate><br/></div>PaulRhttps://wiki.gideros.rocks/index.php?title=TextField&diff=12936TextField2018-11-02T16:22:59Z<p>PaulR: /* Examples */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:TextField --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
The [[Special:MyLanguage/TextField|TextField]] class is used to create display objects for text display.<br /><br />
<br /></translate><br />
=== <translate>Examples</translate> ===<br />
'''Example'''<br/><br />
<source lang="lua">local font = Font.new("myfont.txt", "myfont.png")<br />
<br />
local textfield = TextField.new(font, "some text")<br />
<br />
stage:addChild(textfield)<br />
<br />
textfield:setText("some other text") -- change the text<br />
<br />
-- to use the default font, pass nil value for the font parameter<br />
local textfield2 = TextField.new(nil, "some other text with default font")</source><br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/TextField.new|TextField.new]] ''<translate>creates a new TextField object with the specified font and text</translate>''<br/><!-- GIDEROSMTD:TextField.new(font,text,sample,layout) creates a new TextField object with the specified font and text --><br />
[[Special:MyLanguage/TextField:getLayout|TextField:getLayout]] ''<translate>Retrieve the layout parameters of this Textfield</translate>''<br/><!-- GIDEROSMTD:TextField:getLayout() Retrieve the layout parameters of this Textfield --><br />
[[Special:MyLanguage/TextField:getLetterSpacing|TextField:getLetterSpacing]] ''<translate>returns the letter-spacing property which is used to increase or decrease the space between characters in a text</translate>''<br/><!-- GIDEROSMTD:TextField:getLetterSpacing() returns the letter-spacing property which is used to increase or decrease the space between characters in a text --><br />
[[Special:MyLanguage/TextField:getLineHeight|TextField:getLineHeight]] ''<translate>Get line height</translate>''<br/><!-- GIDEROSMTD:TextField:getLineHeight() Get line height --><br />
[[Special:MyLanguage/TextField:getSample|TextField:getSample]] ''<translate>get string that was used as sample for determining line height</translate>''<br/><!-- GIDEROSMTD:TextField:getSample() get string that was used as sample for determining line height --><br />
[[Special:MyLanguage/TextField:getText|TextField:getText]] ''<translate>returns the text displayed</translate>''<br/><!-- GIDEROSMTD:TextField:getText() returns the text displayed --><br />
[[Special:MyLanguage/TextField:getTextColor|TextField:getTextColor]] ''<translate>returns the color of the text in a text field in hexadecimal format</translate>''<br/><!-- GIDEROSMTD:TextField:getTextColor() returns the color of the text in a text field in hexadecimal format --><br />
[[Special:MyLanguage/TextField:setFont|TextField:setFont]] ''<translate>set font to use</translate>''<br/><!-- GIDEROSMTD:TextField:setFont(font) set font to use --><br />
[[Special:MyLanguage/TextField:setLayout|TextField:setLayout]] ''<translate>Change the layout parameters for this TextField</translate>''<br/><!-- GIDEROSMTD:TextField:setLayout(layout) Change the layout parameters for this TextField --><br />
[[Special:MyLanguage/TextField:setLetterSpacing|TextField:setLetterSpacing]] ''<translate>sets the letter-spacing property which is used to increase or decrease the space between characters in a text</translate>''<br/><!-- GIDEROSMTD:TextField:setLetterSpacing(spacing) sets the letter-spacing property which is used to increase or decrease the space between characters in a text --><br />
[[Special:MyLanguage/TextField:setSample|TextField:setSample]] ''<translate>Set string that will be used as sample for determining text's line height</translate>''<br/><!-- GIDEROSMTD:TextField:setSample(sample) Set string that will be used as sample for determining text's line height --><br />
[[Special:MyLanguage/TextField:setText|TextField:setText]] ''<translate>sets the text to be displayed</translate>''<br/><!-- GIDEROSMTD:TextField:setText(text) sets the text to be displayed --><br />
[[Special:MyLanguage/TextField:setTextColor|TextField:setTextColor]] ''<translate>sets the color of the text in a text field in hexadecimal format</translate>''<br/><!-- GIDEROSMTD:TextField:setTextColor(color) sets the color of the text in a text field in hexadecimal format --><br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Events</translate> ===<br />
=== <translate>Constants</translate> ===<br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=Application:getDeviceInfo&diff=12935Application:getDeviceInfo2018-11-02T16:13:37Z<p>PaulR: /* iOS values */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Returns information about device.<br /><br />
<br /><br />
- For iOS, returns 5 values: &quot;iOS&quot;, iOS version, device type, user interface idiom and device model<br /><br />
- For Android, returns 4 values: &quot;Android&quot;, Android version, manufacturer and model information<br /><br />
- For Windows returns 1 value: &quot;Windows&quot;<br /><br />
- For Mac OS X returns 1 value: &quot;Mac OS&quot;<br /><br />
- For Win32 returns 1 value: &quot;Win32&quot;<br /><br />
<br /><br />
<br />
==== iOS values ====<br />
1st value -> "iOS"<br/><br />
2nd value -> [[UIDevice currentDevice] systemVersion]<br/><br />
3rd value -> [[UIDevice currentDevice] model]<br/><br />
4th value -> UI_USER_INTERFACE_IDIOM() (as "iPhone" or "iPad")<br/><br />
5th value -> hw.machine. <br/><br />
<br/><br />
Here are the possibilities:<br/><br />
iPhone1,1 -> iPhone 1G, M68<br/><br />
iPhone1,2 -> iPhone 3G, N82<br/><br />
iPhone2,1 -> iPhone 3GS, N88<br/><br />
iPhone3,1 -> iPhone 4/AT&T, N89<br/><br />
iPhone3,2 -> iPhone 4/Other Carrier?, ??<br/><br />
iPhone3,3 -> iPhone 4/Verizon, TBD<br/><br />
iPhone4,1 -> (iPhone 4S/GSM), TBD<br/><br />
iPhone4,2 -> (iPhone 4S/CDMA), TBD<br/><br />
iPhone4,3 -> (iPhone 4S/???)<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
<br/><br />
iPod1,1 -> iPod touch 1G, N45<br/><br />
iPod2,1 -> iPod touch 2G, N72<br/><br />
iPod2,2 -> Unknown, ??<br/><br />
iPod3,1 -> iPod touch 3G, N18<br/><br />
iPod4,1 -> iPod touch 4G, N80<br/><br />
<br/><br />
iPad1,1 -> iPad 1G, WiFi and 3G, K48<br/><br />
iPad2,1 -> iPad 2G, WiFi, K93<br/><br />
iPad2,2 -> iPad 2G, GSM 3G, K94<br/><br />
iPad2,3 -> iPad 2G, CDMA 3G, K95<br/><br />
iPad3,1 -> (iPad 3G, WiFi)<br/><br />
iPad3,2 -> (iPad 3G, GSM)<br/><br />
iPad3,3 -> (iPad 3G, CDMA)<br/><br />
iPad4,1 -> (iPad 4G, WiFi)<br/><br />
iPad4,2 -> (iPad 4G, GSM)<br/><br />
iPad4,3 -> (iPad 4G, CDMA)<br/><br />
<br/><br />
i386, x86_64 -> iPhone Simulator<br/><br />
<br/><br />
<br />
==== Android values ====<br />
1st value -> "Android"<br/><br />
2nd value -> android.os.Build.VERSION.SDK_INT<br/><br />
3rd value -> android.os.Build.MANUFACTURER<br/><br />
4th value -> android.os.Build.MODEL</translate><br/><br />
<source lang="lua"><br />
(varies) = Application:getDeviceInfo()<br />
</source><br />
<br/><br />
<br />
=== <translate>Return values</translate> ===<br />
'''<translate>Returns</translate>''' (varies) <translate>Information about device, returned informations varies depending on platform</translate><br/></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Application:getDeviceInfo&diff=12934Application:getDeviceInfo2018-11-02T16:12:09Z<p>PaulR: /* Android values */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Returns information about device.<br /><br />
<br /><br />
- For iOS, returns 5 values: &quot;iOS&quot;, iOS version, device type, user interface idiom and device model<br /><br />
- For Android, returns 4 values: &quot;Android&quot;, Android version, manufacturer and model information<br /><br />
- For Windows returns 1 value: &quot;Windows&quot;<br /><br />
- For Mac OS X returns 1 value: &quot;Mac OS&quot;<br /><br />
- For Win32 returns 1 value: &quot;Win32&quot;<br /><br />
<br /><br />
<br />
==== iOS values ====<br />
1st value -> "iOS"<br/><br />
2nd value -> [[UIDevice currentDevice] systemVersion]<br/><br />
3rd value -> [[UIDevice currentDevice] model]<br/><br />
4th value -> UI_USER_INTERFACE_IDIOM() (as "iPhone" or "iPad")<br/><br />
5th value -> hw.machine. <br/><br />
Here are the possibilities:<br/><br />
iPhone1,1 -> iPhone 1G, M68<br/><br />
iPhone1,2 -> iPhone 3G, N82<br/><br />
iPhone2,1 -> iPhone 3GS, N88<br/><br />
iPhone3,1 -> iPhone 4/AT&T, N89<br/><br />
iPhone3,2 -> iPhone 4/Other Carrier?, ??<br/><br />
iPhone3,3 -> iPhone 4/Verizon, TBD<br/><br />
iPhone4,1 -> (iPhone 4S/GSM), TBD<br/><br />
iPhone4,2 -> (iPhone 4S/CDMA), TBD<br/><br />
iPhone4,3 -> (iPhone 4S/???)<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
<br/><br />
iPod1,1 -> iPod touch 1G, N45<br/><br />
iPod2,1 -> iPod touch 2G, N72<br/><br />
iPod2,2 -> Unknown, ??<br/><br />
iPod3,1 -> iPod touch 3G, N18<br/><br />
iPod4,1 -> iPod touch 4G, N80<br/><br />
<br/><br />
iPad1,1 -> iPad 1G, WiFi and 3G, K48<br/><br />
iPad2,1 -> iPad 2G, WiFi, K93<br/><br />
iPad2,2 -> iPad 2G, GSM 3G, K94<br/><br />
iPad2,3 -> iPad 2G, CDMA 3G, K95<br/><br />
iPad3,1 -> (iPad 3G, WiFi)<br/><br />
iPad3,2 -> (iPad 3G, GSM)<br/><br />
iPad3,3 -> (iPad 3G, CDMA)<br/><br />
iPad4,1 -> (iPad 4G, WiFi)<br/><br />
iPad4,2 -> (iPad 4G, GSM)<br/><br />
iPad4,3 -> (iPad 4G, CDMA)<br/><br />
<br/><br />
i386, x86_64 -> iPhone Simulator<br/><br />
<br/><br />
<br />
==== Android values ====<br />
1st value -> "Android"<br/><br />
2nd value -> android.os.Build.VERSION.SDK_INT<br/><br />
3rd value -> android.os.Build.MANUFACTURER<br/><br />
4th value -> android.os.Build.MODEL</translate><br/><br />
<source lang="lua"><br />
(varies) = Application:getDeviceInfo()<br />
</source><br />
<br/><br />
<br />
=== <translate>Return values</translate> ===<br />
'''<translate>Returns</translate>''' (varies) <translate>Information about device, returned informations varies depending on platform</translate><br/></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Application:getDeviceInfo&diff=12933Application:getDeviceInfo2018-11-02T16:11:46Z<p>PaulR: /* iOS values */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Returns information about device.<br /><br />
<br /><br />
- For iOS, returns 5 values: &quot;iOS&quot;, iOS version, device type, user interface idiom and device model<br /><br />
- For Android, returns 4 values: &quot;Android&quot;, Android version, manufacturer and model information<br /><br />
- For Windows returns 1 value: &quot;Windows&quot;<br /><br />
- For Mac OS X returns 1 value: &quot;Mac OS&quot;<br /><br />
- For Win32 returns 1 value: &quot;Win32&quot;<br /><br />
<br /><br />
<br />
==== iOS values ====<br />
1st value -> "iOS"<br/><br />
2nd value -> [[UIDevice currentDevice] systemVersion]<br/><br />
3rd value -> [[UIDevice currentDevice] model]<br/><br />
4th value -> UI_USER_INTERFACE_IDIOM() (as "iPhone" or "iPad")<br/><br />
5th value -> hw.machine. <br/><br />
Here are the possibilities:<br/><br />
iPhone1,1 -> iPhone 1G, M68<br/><br />
iPhone1,2 -> iPhone 3G, N82<br/><br />
iPhone2,1 -> iPhone 3GS, N88<br/><br />
iPhone3,1 -> iPhone 4/AT&T, N89<br/><br />
iPhone3,2 -> iPhone 4/Other Carrier?, ??<br/><br />
iPhone3,3 -> iPhone 4/Verizon, TBD<br/><br />
iPhone4,1 -> (iPhone 4S/GSM), TBD<br/><br />
iPhone4,2 -> (iPhone 4S/CDMA), TBD<br/><br />
iPhone4,3 -> (iPhone 4S/???)<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
<br/><br />
iPod1,1 -> iPod touch 1G, N45<br/><br />
iPod2,1 -> iPod touch 2G, N72<br/><br />
iPod2,2 -> Unknown, ??<br/><br />
iPod3,1 -> iPod touch 3G, N18<br/><br />
iPod4,1 -> iPod touch 4G, N80<br/><br />
<br/><br />
iPad1,1 -> iPad 1G, WiFi and 3G, K48<br/><br />
iPad2,1 -> iPad 2G, WiFi, K93<br/><br />
iPad2,2 -> iPad 2G, GSM 3G, K94<br/><br />
iPad2,3 -> iPad 2G, CDMA 3G, K95<br/><br />
iPad3,1 -> (iPad 3G, WiFi)<br/><br />
iPad3,2 -> (iPad 3G, GSM)<br/><br />
iPad3,3 -> (iPad 3G, CDMA)<br/><br />
iPad4,1 -> (iPad 4G, WiFi)<br/><br />
iPad4,2 -> (iPad 4G, GSM)<br/><br />
iPad4,3 -> (iPad 4G, CDMA)<br/><br />
<br/><br />
i386, x86_64 -> iPhone Simulator<br/><br />
<br/><br />
<br />
==== Android values ====<br />
1st value -> "Android"<br/><br />
2nd value -> android.os.Build.VERSION.SDK_INT<br/><br />
3rd value -> android.os.Build.MANUFACTURER<br/><br />
4th value -> android.os.Build.MODEL</translate><br/><br />
<source lang="lua"><br />
(varies) = Application:getDeviceInfo()<br />
</source><br />
<br />
=== <translate>Return values</translate> ===<br />
'''<translate>Returns</translate>''' (varies) <translate>Information about device, returned informations varies depending on platform</translate><br/></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Application:getDeviceInfo&diff=12932Application:getDeviceInfo2018-11-02T16:11:22Z<p>PaulR: /* Android values */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Returns information about device.<br /><br />
<br /><br />
- For iOS, returns 5 values: &quot;iOS&quot;, iOS version, device type, user interface idiom and device model<br /><br />
- For Android, returns 4 values: &quot;Android&quot;, Android version, manufacturer and model information<br /><br />
- For Windows returns 1 value: &quot;Windows&quot;<br /><br />
- For Mac OS X returns 1 value: &quot;Mac OS&quot;<br /><br />
- For Win32 returns 1 value: &quot;Win32&quot;<br /><br />
<br /><br />
<br />
==== iOS values ====<br />
1st value -> "iOS"<br/><br />
2nd value -> [[UIDevice currentDevice] systemVersion]<br/><br />
3rd value -> [[UIDevice currentDevice] model]<br/><br />
4th value -> UI_USER_INTERFACE_IDIOM() (as "iPhone" or "iPad")<br/><br />
5th value -> hw.machine. <br/><br />
Here are the possibilities:<br/><br />
iPhone1,1 -> iPhone 1G, M68<br/><br />
iPhone1,2 -> iPhone 3G, N82<br/><br />
iPhone2,1 -> iPhone 3GS, N88<br/><br />
iPhone3,1 -> iPhone 4/AT&T, N89<br/><br />
iPhone3,2 -> iPhone 4/Other Carrier?, ??<br/><br />
iPhone3,3 -> iPhone 4/Verizon, TBD<br/><br />
iPhone4,1 -> (iPhone 4S/GSM), TBD<br/><br />
iPhone4,2 -> (iPhone 4S/CDMA), TBD<br/><br />
iPhone4,3 -> (iPhone 4S/???)<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
<br/><br />
iPod1,1 -> iPod touch 1G, N45<br/><br />
iPod2,1 -> iPod touch 2G, N72<br/><br />
iPod2,2 -> Unknown, ??<br/><br />
iPod3,1 -> iPod touch 3G, N18<br/><br />
iPod4,1 -> iPod touch 4G, N80<br/><br />
<br/><br />
iPad1,1 -> iPad 1G, WiFi and 3G, K48<br/><br />
iPad2,1 -> iPad 2G, WiFi, K93<br/><br />
iPad2,2 -> iPad 2G, GSM 3G, K94<br/><br />
iPad2,3 -> iPad 2G, CDMA 3G, K95<br/><br />
iPad3,1 -> (iPad 3G, WiFi)<br/><br />
iPad3,2 -> (iPad 3G, GSM)<br/><br />
iPad3,3 -> (iPad 3G, CDMA)<br/><br />
iPad4,1 -> (iPad 4G, WiFi)<br/><br />
iPad4,2 -> (iPad 4G, GSM)<br/><br />
iPad4,3 -> (iPad 4G, CDMA)<br/><br />
<br/><br />
i386, x86_64 -> iPhone Simulator<br/><br />
<br/><br />
<br />
==== Android values ====<br />
1st value -> "Android"<br/><br />
2nd value -> android.os.Build.VERSION.SDK_INT<br/><br />
3rd value -> android.os.Build.MANUFACTURER<br/><br />
4th value -> android.os.Build.MODEL</translate><br/><br />
<source lang="lua"><br />
(varies) = Application:getDeviceInfo()<br />
</source><br />
<br />
=== <translate>Return values</translate> ===<br />
'''<translate>Returns</translate>''' (varies) <translate>Information about device, returned informations varies depending on platform</translate><br/></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Application:getDeviceInfo&diff=12931Application:getDeviceInfo2018-11-02T16:11:06Z<p>PaulR: /* iOS values */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Returns information about device.<br /><br />
<br /><br />
- For iOS, returns 5 values: &quot;iOS&quot;, iOS version, device type, user interface idiom and device model<br /><br />
- For Android, returns 4 values: &quot;Android&quot;, Android version, manufacturer and model information<br /><br />
- For Windows returns 1 value: &quot;Windows&quot;<br /><br />
- For Mac OS X returns 1 value: &quot;Mac OS&quot;<br /><br />
- For Win32 returns 1 value: &quot;Win32&quot;<br /><br />
<br /><br />
<br />
==== iOS values ====<br />
1st value -> "iOS"<br/><br />
2nd value -> [[UIDevice currentDevice] systemVersion]<br/><br />
3rd value -> [[UIDevice currentDevice] model]<br/><br />
4th value -> UI_USER_INTERFACE_IDIOM() (as "iPhone" or "iPad")<br/><br />
5th value -> hw.machine. <br/><br />
Here are the possibilities:<br/><br />
iPhone1,1 -> iPhone 1G, M68<br/><br />
iPhone1,2 -> iPhone 3G, N82<br/><br />
iPhone2,1 -> iPhone 3GS, N88<br/><br />
iPhone3,1 -> iPhone 4/AT&T, N89<br/><br />
iPhone3,2 -> iPhone 4/Other Carrier?, ??<br/><br />
iPhone3,3 -> iPhone 4/Verizon, TBD<br/><br />
iPhone4,1 -> (iPhone 4S/GSM), TBD<br/><br />
iPhone4,2 -> (iPhone 4S/CDMA), TBD<br/><br />
iPhone4,3 -> (iPhone 4S/???)<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
<br/><br />
iPod1,1 -> iPod touch 1G, N45<br/><br />
iPod2,1 -> iPod touch 2G, N72<br/><br />
iPod2,2 -> Unknown, ??<br/><br />
iPod3,1 -> iPod touch 3G, N18<br/><br />
iPod4,1 -> iPod touch 4G, N80<br/><br />
<br/><br />
iPad1,1 -> iPad 1G, WiFi and 3G, K48<br/><br />
iPad2,1 -> iPad 2G, WiFi, K93<br/><br />
iPad2,2 -> iPad 2G, GSM 3G, K94<br/><br />
iPad2,3 -> iPad 2G, CDMA 3G, K95<br/><br />
iPad3,1 -> (iPad 3G, WiFi)<br/><br />
iPad3,2 -> (iPad 3G, GSM)<br/><br />
iPad3,3 -> (iPad 3G, CDMA)<br/><br />
iPad4,1 -> (iPad 4G, WiFi)<br/><br />
iPad4,2 -> (iPad 4G, GSM)<br/><br />
iPad4,3 -> (iPad 4G, CDMA)<br/><br />
<br/><br />
i386, x86_64 -> iPhone Simulator<br/><br />
<br/><br />
<br />
== Android values ==<br />
1st value -> "Android"<br/><br />
2nd value -> android.os.Build.VERSION.SDK_INT<br/><br />
3rd value -> android.os.Build.MANUFACTURER<br/><br />
4th value -> android.os.Build.MODEL</translate><br/><br />
<source lang="lua"><br />
(varies) = Application:getDeviceInfo()<br />
</source><br />
<br />
=== <translate>Return values</translate> ===<br />
'''<translate>Returns</translate>''' (varies) <translate>Information about device, returned informations varies depending on platform</translate><br/></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Application:getDeviceInfo&diff=12930Application:getDeviceInfo2018-11-02T16:10:31Z<p>PaulR: /* Description */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Returns information about device.<br /><br />
<br /><br />
- For iOS, returns 5 values: &quot;iOS&quot;, iOS version, device type, user interface idiom and device model<br /><br />
- For Android, returns 4 values: &quot;Android&quot;, Android version, manufacturer and model information<br /><br />
- For Windows returns 1 value: &quot;Windows&quot;<br /><br />
- For Mac OS X returns 1 value: &quot;Mac OS&quot;<br /><br />
- For Win32 returns 1 value: &quot;Win32&quot;<br /><br />
<br /><br />
<br />
== iOS values ==<br />
1st value -> "iOS"<br/><br />
2nd value -> [[UIDevice currentDevice] systemVersion]<br/><br />
3rd value -> [[UIDevice currentDevice] model]<br/><br />
4th value -> UI_USER_INTERFACE_IDIOM() (as "iPhone" or "iPad")<br/><br />
5th value -> hw.machine. <br/><br />
Here are the possibilities:<br/><br />
iPhone1,1 -> iPhone 1G, M68<br/><br />
iPhone1,2 -> iPhone 3G, N82<br/><br />
iPhone2,1 -> iPhone 3GS, N88<br/><br />
iPhone3,1 -> iPhone 4/AT&T, N89<br/><br />
iPhone3,2 -> iPhone 4/Other Carrier?, ??<br/><br />
iPhone3,3 -> iPhone 4/Verizon, TBD<br/><br />
iPhone4,1 -> (iPhone 4S/GSM), TBD<br/><br />
iPhone4,2 -> (iPhone 4S/CDMA), TBD<br/><br />
iPhone4,3 -> (iPhone 4S/???)<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
<br/><br />
iPod1,1 -> iPod touch 1G, N45<br/><br />
iPod2,1 -> iPod touch 2G, N72<br/><br />
iPod2,2 -> Unknown, ??<br/><br />
iPod3,1 -> iPod touch 3G, N18<br/><br />
iPod4,1 -> iPod touch 4G, N80<br/><br />
<br/><br />
iPad1,1 -> iPad 1G, WiFi and 3G, K48<br/><br />
iPad2,1 -> iPad 2G, WiFi, K93<br/><br />
iPad2,2 -> iPad 2G, GSM 3G, K94<br/><br />
iPad2,3 -> iPad 2G, CDMA 3G, K95<br/><br />
iPad3,1 -> (iPad 3G, WiFi)<br/><br />
iPad3,2 -> (iPad 3G, GSM)<br/><br />
iPad3,3 -> (iPad 3G, CDMA)<br/><br />
iPad4,1 -> (iPad 4G, WiFi)<br/><br />
iPad4,2 -> (iPad 4G, GSM)<br/><br />
iPad4,3 -> (iPad 4G, CDMA)<br/><br />
<br/><br />
i386, x86_64 -> iPhone Simulator<br/><br />
<br/><br />
== Android values ==<br />
1st value -> "Android"<br/><br />
2nd value -> android.os.Build.VERSION.SDK_INT<br/><br />
3rd value -> android.os.Build.MANUFACTURER<br/><br />
4th value -> android.os.Build.MODEL</translate><br/><br />
<source lang="lua"><br />
(varies) = Application:getDeviceInfo()<br />
</source><br />
<br />
=== <translate>Return values</translate> ===<br />
'''<translate>Returns</translate>''' (varies) <translate>Information about device, returned informations varies depending on platform</translate><br/></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Application:getDeviceInfo&diff=12929Application:getDeviceInfo2018-11-02T16:10:02Z<p>PaulR: /* Description */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Returns information about device.<br /><br />
<br /><br />
- For iOS, returns 5 values: &quot;iOS&quot;, iOS version, device type, user interface idiom and device model<br /><br />
- For Android, returns 4 values: &quot;Android&quot;, Android version, manufacturer and model information<br /><br />
- For Windows returns 1 value: &quot;Windows&quot;<br /><br />
- For Mac OS X returns 1 value: &quot;Mac OS&quot;<br /><br />
- For Win32 returns 1 value: &quot;Win32&quot;<br /><br />
<br /><br />
<br />
==iOS values==<br/><br />
1st value -> "iOS"<br/><br />
2nd value -> [[UIDevice currentDevice] systemVersion]<br/><br />
3rd value -> [[UIDevice currentDevice] model]<br/><br />
4th value -> UI_USER_INTERFACE_IDIOM() (as "iPhone" or "iPad")<br/><br />
5th value -> hw.machine. <br/><br />
Here are the possibilities:<br/><br />
iPhone1,1 -> iPhone 1G, M68<br/><br />
iPhone1,2 -> iPhone 3G, N82<br/><br />
iPhone2,1 -> iPhone 3GS, N88<br/><br />
iPhone3,1 -> iPhone 4/AT&T, N89<br/><br />
iPhone3,2 -> iPhone 4/Other Carrier?, ??<br/><br />
iPhone3,3 -> iPhone 4/Verizon, TBD<br/><br />
iPhone4,1 -> (iPhone 4S/GSM), TBD<br/><br />
iPhone4,2 -> (iPhone 4S/CDMA), TBD<br/><br />
iPhone4,3 -> (iPhone 4S/???)<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
<br/><br />
iPod1,1 -> iPod touch 1G, N45<br/><br />
iPod2,1 -> iPod touch 2G, N72<br/><br />
iPod2,2 -> Unknown, ??<br/><br />
iPod3,1 -> iPod touch 3G, N18<br/><br />
iPod4,1 -> iPod touch 4G, N80<br/><br />
<br/><br />
iPad1,1 -> iPad 1G, WiFi and 3G, K48<br/><br />
iPad2,1 -> iPad 2G, WiFi, K93<br/><br />
iPad2,2 -> iPad 2G, GSM 3G, K94<br/><br />
iPad2,3 -> iPad 2G, CDMA 3G, K95<br/><br />
iPad3,1 -> (iPad 3G, WiFi)<br/><br />
iPad3,2 -> (iPad 3G, GSM)<br/><br />
iPad3,3 -> (iPad 3G, CDMA)<br/><br />
iPad4,1 -> (iPad 4G, WiFi)<br/><br />
iPad4,2 -> (iPad 4G, GSM)<br/><br />
iPad4,3 -> (iPad 4G, CDMA)<br/><br />
<br/><br />
i386, x86_64 -> iPhone Simulator<br/><br />
<br/><br />
==Android values==<br/><br />
1st value -> "Android"<br/><br />
2nd value -> android.os.Build.VERSION.SDK_INT<br/><br />
3rd value -> android.os.Build.MANUFACTURER<br/><br />
4th value -> android.os.Build.MODEL</translate><br/><br />
<source lang="lua"><br />
(varies) = Application:getDeviceInfo()<br />
</source><br />
<br />
=== <translate>Return values</translate> ===<br />
'''<translate>Returns</translate>''' (varies) <translate>Information about device, returned informations varies depending on platform</translate><br/></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Application:getDeviceInfo&diff=12928Application:getDeviceInfo2018-11-02T16:09:19Z<p>PaulR: /* Description */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Returns information about device.<br /><br />
<br /><br />
- For iOS, returns 5 values: &quot;iOS&quot;, iOS version, device type, user interface idiom and device model<br /><br />
- For Android, returns 4 values: &quot;Android&quot;, Android version, manufacturer and model information<br /><br />
- For Windows returns 1 value: &quot;Windows&quot;<br /><br />
- For Mac OS X returns 1 value: &quot;Mac OS&quot;<br /><br />
- For Win32 returns 1 value: &quot;Win32&quot;<br /><br />
<br /><br />
<br />
''iOS values''<br />
1st value -> "iOS"<br/><br />
2nd value -> [[UIDevice currentDevice] systemVersion]<br/><br />
3rd value -> [[UIDevice currentDevice] model]<br/><br />
4th value -> UI_USER_INTERFACE_IDIOM() (as "iPhone" or "iPad")<br/><br />
5th value -> hw.machine. <br/><br />
Here are the possibilities:<br/><br />
iPhone1,1 -> iPhone 1G, M68<br/><br />
iPhone1,2 -> iPhone 3G, N82<br/><br />
iPhone2,1 -> iPhone 3GS, N88<br/><br />
iPhone3,1 -> iPhone 4/AT&T, N89<br/><br />
iPhone3,2 -> iPhone 4/Other Carrier?, ??<br/><br />
iPhone3,3 -> iPhone 4/Verizon, TBD<br/><br />
iPhone4,1 -> (iPhone 4S/GSM), TBD<br/><br />
iPhone4,2 -> (iPhone 4S/CDMA), TBD<br/><br />
iPhone4,3 -> (iPhone 4S/???)<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
iPhone5,1 -> iPhone Next Gen, TBD<br/><br />
<br/><br />
iPod1,1 -> iPod touch 1G, N45<br/><br />
iPod2,1 -> iPod touch 2G, N72<br/><br />
iPod2,2 -> Unknown, ??<br/><br />
iPod3,1 -> iPod touch 3G, N18<br/><br />
iPod4,1 -> iPod touch 4G, N80<br/><br />
<br/><br />
iPad1,1 -> iPad 1G, WiFi and 3G, K48<br/><br />
iPad2,1 -> iPad 2G, WiFi, K93<br/><br />
iPad2,2 -> iPad 2G, GSM 3G, K94<br/><br />
iPad2,3 -> iPad 2G, CDMA 3G, K95<br/><br />
iPad3,1 -> (iPad 3G, WiFi)<br/><br />
iPad3,2 -> (iPad 3G, GSM)<br/><br />
iPad3,3 -> (iPad 3G, CDMA)<br/><br />
iPad4,1 -> (iPad 4G, WiFi)<br/><br />
iPad4,2 -> (iPad 4G, GSM)<br/><br />
iPad4,3 -> (iPad 4G, CDMA)<br/><br />
<br/><br />
i386, x86_64 -> iPhone Simulator<br/><br />
<br/><br />
''Android values''<br/><br />
1st value -> "Android"<br/><br />
2nd value -> android.os.Build.VERSION.SDK_INT<br/><br />
3rd value -> android.os.Build.MANUFACTURER<br/><br />
4th value -> android.os.Build.MODEL</translate><br/><br />
<source lang="lua"><br />
(varies) = Application:getDeviceInfo()<br />
</source><br />
<br />
=== <translate>Return values</translate> ===<br />
'''<translate>Returns</translate>''' (varies) <translate>Information about device, returned informations varies depending on platform</translate><br/></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Application:getDeviceInfo&diff=12927Application:getDeviceInfo2018-11-02T16:07:38Z<p>PaulR: /* Description */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Returns information about device.<br /><br />
<br /><br />
- For iOS, returns 5 values: &quot;iOS&quot;, iOS version, device type, user interface idiom and device model<br /><br />
- For Android, returns 4 values: &quot;Android&quot;, Android version, manufacturer and model information<br /><br />
- For Windows returns 1 value: &quot;Windows&quot;<br /><br />
- For Mac OS X returns 1 value: &quot;Mac OS&quot;<br /><br />
- For Win32 returns 1 value: &quot;Win32&quot;<br /><br />
<br /><br />
<br />
''iOS values''<br />
1st value -> "iOS"<br/><br />
2nd value -> [[UIDevice currentDevice] systemVersion]<br />
3rd value -> [[UIDevice currentDevice] model]<br />
4th value -> UI_USER_INTERFACE_IDIOM() (as "iPhone" or "iPad")<br />
5th value -> hw.machine. <br />
Here are the possibilities:<br />
iPhone1,1 -> iPhone 1G, M68<br />
iPhone1,2 -> iPhone 3G, N82<br />
iPhone2,1 -> iPhone 3GS, N88<br />
iPhone3,1 -> iPhone 4/AT&T, N89<br />
iPhone3,2 -> iPhone 4/Other Carrier?, ??<br />
iPhone3,3 -> iPhone 4/Verizon, TBD<br />
iPhone4,1 -> (iPhone 4S/GSM), TBD<br />
iPhone4,2 -> (iPhone 4S/CDMA), TBD<br />
iPhone4,3 -> (iPhone 4S/???)<br />
iPhone5,1 -> iPhone Next Gen, TBD<br />
iPhone5,1 -> iPhone Next Gen, TBD<br />
iPhone5,1 -> iPhone Next Gen, TBD<br />
<br />
iPod1,1 -> iPod touch 1G, N45<br />
iPod2,1 -> iPod touch 2G, N72<br />
iPod2,2 -> Unknown, ??<br />
iPod3,1 -> iPod touch 3G, N18<br />
iPod4,1 -> iPod touch 4G, N80<br />
<br />
iPad1,1 -> iPad 1G, WiFi and 3G, K48<br />
iPad2,1 -> iPad 2G, WiFi, K93<br />
iPad2,2 -> iPad 2G, GSM 3G, K94<br />
iPad2,3 -> iPad 2G, CDMA 3G, K95<br />
iPad3,1 -> (iPad 3G, WiFi)<br />
iPad3,2 -> (iPad 3G, GSM)<br />
iPad3,3 -> (iPad 3G, CDMA)<br />
iPad4,1 -> (iPad 4G, WiFi)<br />
iPad4,2 -> (iPad 4G, GSM)<br />
iPad4,3 -> (iPad 4G, CDMA)<br />
<br />
i386, x86_64 -> iPhone Simulator<br />
<br />
''Android values''<br />
1st value -> "Android"<br />
2nd value -> android.os.Build.VERSION.SDK_INT<br />
3rd value -> android.os.Build.MANUFACTURER<br />
4th value -> android.os.Build.MODEL</translate><br />
<source lang="lua"><br />
(varies) = Application:getDeviceInfo()<br />
</source><br />
<br />
=== <translate>Return values</translate> ===<br />
'''<translate>Returns</translate>''' (varies) <translate>Information about device, returned informations varies depending on platform</translate><br/></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Making_a_Plugin&diff=12926Making a Plugin2018-11-01T22:00:39Z<p>PaulR: Blanked the page</p>
<hr />
<div></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Making_a_Plugin&diff=12925Making a Plugin2018-11-01T22:00:22Z<p>PaulR: Undo revision 12919 by PaulR (talk)</p>
<hr />
<div>The Gideros plugin system is used primarily to extend the functionality of the Gideros API, for example by writing a plugin that provides Lua bindings to an existing native library. Although Gideros is open source, the plugin system keeps the size of the core lean and mean by allowing users to choose which plugins to export with which project. Here we'll walk through the process of creating a plugin, hopefully explaining the important bits along the way.<br />
<br />
To start writing a plugin you need to first get your Gideros native development environment set up, by following [[Special:MyLanguage/Compiling Gideros Source|Compiling Gideros Source]]. You can start off with just the Desktop target, so only really need Qt and Git (and MSYS2 on Windows). But following through the instructions there will allow you to create and build plugins for all Gideros export targets.<br />
<br />
__TOC__<br />
<br />
===The .gplugin file===<br />
<br />
You can see in the gideros/plugins directory that there is a name_of_plugin.gplugin file for each (actually not all, but that's not important just now) plugin. This is an XML file that defines which platforms the plugin supports and what should be done with plugin files when exporting a project to the relevant target. It's important to note that Gideros makes use of template projects for exporting and you can see there are append/by sections which find/replace relevant parts of the template.<br />
<br />
<source lang="xml"><br />
<plugin<br />
name="Pathfinder"<br />
description="High performance 2D pathfinding."<br />
><br />
</source></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Notification&diff=12924Notification2018-11-01T19:29:47Z<p>PaulR: /* Examples */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:Notification --><br />
'''<translate>Supported platforms</translate>:''' <br/><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
=== <translate>Description</translate> ===<br />
<translate>Notification class is used to compose and schedule new local notifications. You need to provide an ID of notification to constructor. Using same provided ID you can create a new instance of Notification class and modify existing notification with that ID. Additionally the ID allows you to identify local notification in the table of scheduled local notifications retrieved from [[Special:MyLanguage/NotificationManager:getScheduledNotifications|NotificationManager:getScheduledNotifications]], or table of local notifications that were already displayed using [[Special:MyLanguage/NotificationManager:getLocalNotifications|NotificationManager:getLocalNotifications]]<br />
<br />
[[Special:MyLanguage/Notification|Notification]] consists of notification message, title, sound and number. Only message is the mandatory one. You can combine others as you wish.</translate><br />
=== <translate>Examples</translate> ===<br />
'''Create new notification and dispatch right away'''<br/><br />
<source lang="lua">local note = Notification.new(1)<br />
note:setTitle("Notification app")<br />
note:setMessage("Do you see me?")<br />
note:setSound("./some_sound.wav")<br />
note:dispatchNow()</source><br />
<br/>'''Create new notification and dispatch after one hour with repeating period of one day'''<br/><br />
<source lang="lua">local note = Notification.new(2)<br />
note:setTitle("Notification app")<br />
note:setMessage("I will bother you each day")<br />
note:dispatchAfter({hour = 1}, {day = 1})</source><br />
<br/>'''Create new notification and dispatch on specific date in specific time'''<br/><br />
<source lang="lua">local note = Notification.new(3)<br />
note:setTitle("Notification app")<br />
note:setMessage("Happy Birthday")<br />
note:dispatchOn({year = 2013, month = 8, day = 1, hour = 9, min = 0, sec = 0})</source><br />
<br/>'''Modifying existing scheduled notification'''<br/><br />
<source lang="lua">--id of notification to modify<br />
local id = 1<br />
<br />
--retrieve shared instance<br />
local mngr = NotificationManager.getSharedInstance()<br />
<br />
--retrieve table with scheduled notifications<br />
local t = mngr:getScheduledNotifications()<br />
<br />
--check if id is in it<br />
if t[id] then<br />
--notification is still scheduled<br />
--let's modify it by creating new instance with same id<br />
local note = Notification.new(id)<br />
note:setTitle("New title")<br />
note:setMessage("New message")<br />
--if we want to modify dispatch time we need to redispatch it<br />
note:dispatchAfter({day = 1})<br />
end</source><br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/Notification.new|Notification.new]] ''<translate>creates new notification</translate>''<br/><!-- GIDEROSMTD:Notification.new() creates new notification --><br />
[[Special:MyLanguage/Notification:cancel|Notification:cancel]] ''<translate>cancel notification</translate>''<br/><!-- GIDEROSMTD:Notification:cancel() cancel notification --><br />
[[Special:MyLanguage/Notification:dispatchAfter|Notification:dispatchAfter]] ''<translate>Dispatch notification after specified time</translate>''<br/><!-- GIDEROSMTD:Notification:dispatchAfter() Dispatch notification after specified time --><br />
[[Special:MyLanguage/Notification:dispatchNow|Notification:dispatchNow]] ''<translate>dispatch notification now</translate>''<br/><!-- GIDEROSMTD:Notification:dispatchNow() dispatch notification now --><br />
[[Special:MyLanguage/Notification:dispatchOn|Notification:dispatchOn]] ''<translate>dispatch on specified date</translate>''<br/><!-- GIDEROSMTD:Notification:dispatchOn() dispatch on specified date --><br />
[[Special:MyLanguage/Notification:getId|Notification:getId]] ''<translate>get id of notification</translate>''<br/><!-- GIDEROSMTD:Notification:getId() get id of notification --><br />
[[Special:MyLanguage/Notification:getMessage|Notification:getMessage]] ''<translate>get message of notification</translate>''<br/><!-- GIDEROSMTD:Notification:getMessage() get message of notification --><br />
[[Special:MyLanguage/Notification:getNumber|Notification:getNumber]] ''<translate>get notification number</translate>''<br/><!-- GIDEROSMTD:Notification:getNumber() get notification number --><br />
[[Special:MyLanguage/Notification:getSound|Notification:getSound]] ''<translate>get sound of notification</translate>''<br/><!-- GIDEROSMTD:Notification:getSound() get sound of notification --><br />
[[Special:MyLanguage/Notification:getTitle|Notification:getTitle]] ''<translate>get title of notification</translate>''<br/><!-- GIDEROSMTD:Notification:getTitle() get title of notification --><br />
[[Special:MyLanguage/Notification:setNumber|Notification:setNumber]] ''<translate>set notification number</translate>''<br/><!-- GIDEROSMTD:Notification:setNumber() set notification number --><br />
[[Special:MyLanguage/Notification:setSound|Notification:setSound]] ''<translate>set notification sound</translate>''<br/><!-- GIDEROSMTD:Notification:setSound() set notification sound --><br />
[[Special:MyLanguage/Notification:setTitle|Notification:setTitle]] ''<translate>set the title of notification</translate>''<br/><!-- GIDEROSMTD:Notification:setTitle() set the title of notification --><br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Events</translate> ===<br />
=== <translate>Constants</translate> ===<br />
[[Special:MyLanguage/Notification.DEFAULT_SOUND|Notification.DEFAULT_SOUND]]<br/><!-- GIDEROSCST:Notification.DEFAULT_SOUND default--><br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=Event&diff=12923Event2018-11-01T10:31:45Z<p>PaulR: /* Examples */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:Event --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
The objects of [[Special:MyLanguage/Event|Event]] class contains information about an event that has occurred. [[Special:MyLanguage/Event|Event]] objects<br /><br />
are passed to event listeners when an event occurs.<br /><br />
<br /><br />
Usually event objects contains specific additional information about the event that has occured. For example,<br /><br />
when an [[Special:MyLanguage/Event.MOUSE_DOWN|Event.MOUSE_DOWN]] event occurs, ''x'' and ''y'' fields contain the coordinates.<br /><br />
Users can create their own events and dispatch through the event mechanism.<br /></translate><br />
=== <translate>Examples</translate> ===<br />
'''Mouse down event example'''<br/><br />
<source lang="lua">function onMouseDown(event)<br />
print(event.x, event.y)<br />
end<br />
<br />
mysprite:addEventListener(Event.MOUSE_DOWN, onMouseDown)</source><br />
<br/><br />
'''User created event'''<br/><br />
<source lang="lua">local event = Event.new("myevent")<br />
event.data1 = "12345"<br />
event.data2 = "abcde"<br />
mydispatcher:dispatchEvent(event)</source><br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/Event.new|Event.new]] ''<translate>creates a new Event object</translate>''<br/><!-- GIDEROSMTD:Event.new(type) creates a new Event object --><br />
[[Special:MyLanguage/Event:getTarget|Event:getTarget]] ''<translate>returns the element on which the event listener was registered</translate>''<br/><!-- GIDEROSMTD:Event:getTarget() returns the element on which the event listener was registered --><br />
[[Special:MyLanguage/Event:getType|Event:getType]] ''<translate>returns the type of Event</translate>''<br/><!-- GIDEROSMTD:Event:getType() returns the type of Event --><br />
[[Special:MyLanguage/Event:stopPropagation|Event:stopPropagation]] ''<translate>stops the propagation of the current event in the scene tree hierarchy</translate>''<br/><!-- GIDEROSMTD:Event:stopPropagation() stops the propagation of the current event in the scene tree hierarchy --><br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Events</translate> ===<br />
=== <translate>Constants</translate> ===<br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=Event&diff=12922Event2018-11-01T10:31:21Z<p>PaulR: /* Examples */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:Event --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
The objects of [[Special:MyLanguage/Event|Event]] class contains information about an event that has occurred. [[Special:MyLanguage/Event|Event]] objects<br /><br />
are passed to event listeners when an event occurs.<br /><br />
<br /><br />
Usually event objects contains specific additional information about the event that has occured. For example,<br /><br />
when an [[Special:MyLanguage/Event.MOUSE_DOWN|Event.MOUSE_DOWN]] event occurs, ''x'' and ''y'' fields contain the coordinates.<br /><br />
Users can create their own events and dispatch through the event mechanism.<br /></translate><br />
=== <translate>Examples</translate> ===<br />
'''Mouse down event example'''<br/><br />
<source lang="lua">function onMouseDown(event)<br />
print(event.x, event.y)<br />
end<br />
<br />
mysprite:addEventListener(Event.MOUSE_DOWN, onMouseDown)</source><br />
'''User created event'''<br/><br />
<source lang="lua">local event = Event.new("myevent")<br />
event.data1 = "12345"<br />
event.data2 = "abcde"<br />
mydispatcher:dispatchEvent(event)</source><br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/Event.new|Event.new]] ''<translate>creates a new Event object</translate>''<br/><!-- GIDEROSMTD:Event.new(type) creates a new Event object --><br />
[[Special:MyLanguage/Event:getTarget|Event:getTarget]] ''<translate>returns the element on which the event listener was registered</translate>''<br/><!-- GIDEROSMTD:Event:getTarget() returns the element on which the event listener was registered --><br />
[[Special:MyLanguage/Event:getType|Event:getType]] ''<translate>returns the type of Event</translate>''<br/><!-- GIDEROSMTD:Event:getType() returns the type of Event --><br />
[[Special:MyLanguage/Event:stopPropagation|Event:stopPropagation]] ''<translate>stops the propagation of the current event in the scene tree hierarchy</translate>''<br/><!-- GIDEROSMTD:Event:stopPropagation() stops the propagation of the current event in the scene tree hierarchy --><br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Events</translate> ===<br />
=== <translate>Constants</translate> ===<br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=EventDispatcher&diff=12921EventDispatcher2018-11-01T10:29:36Z<p>PaulR: /* Examples */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:EventDispatcher --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
All classes that dispatch events inherit from [[Special:MyLanguage/EventDispatcher|EventDispatcher]]. The target of an event is a listener function and an optional data value.<br /><br />
When an event is dispatched, the registered function is called.<br /><br />
If the optional data value is given, it is used as a first parameter while calling the listener function.<br /><br />
Event dispatching and event targets are the core part of the Gideros event model. Different event types (such as [[Special:MyLanguage/Event.ENTER_FRAME|Event.ENTER_FRAME]], [[Special:MyLanguage/Event.TOUCHES_BEGIN|Event.TOUCHES_BEGIN]] or [[Special:MyLanguage/Event.MOUSE_DOWN|Event.MOUSE_DOWN]]) flow through the scene tree hierarchy differently. When a touch or mouse event occurs, Gideros dispatches an event object into the event flow from the root of the scene tree.<br /><br />
On the other hand, [[Special:MyLanguage/Event.ENTER_FRAME|Event.ENTER_FRAME]] event is dispatched to all [[Special:MyLanguage/Sprite|Sprite]] objects.<br /><br />
<br /><br />
If you want to define a class that dispatches events, you can inherit your class from [[Special:MyLanguage/EventDispatcher|EventDispatcher]].<br /></translate><br />
=== <translate>Examples</translate> ===<br />
'''Example'''<br/><br />
<source lang="lua">-- example 1<br />
ClassA = Core.class(EventDispatcher)<br />
ClassB = Core.class(EventDispatcher)<br />
<br />
function ClassA:funcA(event)<br />
print("funcA", self, event:getType(), event:getTarget())<br />
end<br />
<br />
local a = ClassA.new()<br />
local b = ClassB.new()<br />
<br />
b:addEventListener("myevent", a.funcA, a) -- when b dispatches an "myevent" event,<br />
-- a.funcA will be called with 'a'<br />
-- as first parameter<br />
<br />
b:dispatchEvent(Event.new("myevent")) -- will print "funcA"<br />
<br />
<br />
-- example 2<br />
Ball = Core.class(Sprite)<br />
<br />
function Ball:onEnterFrame()<br />
self:setX(self:getX() + 1)<br />
end<br />
<br />
ball = Ball.new()<br />
ball:addEventListener(Event.ENTER_FRAME, ball.onEnterFrame, ball)</source><br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/EventDispatcher.new|EventDispatcher.new]] ''<translate>creates a new EventDispatcher object</translate>''<br/><!-- GIDEROSMTD:EventDispatcher.new() creates a new EventDispatcher object --><br />
[[Special:MyLanguage/EventDispatcher:addEventListener|EventDispatcher:addEventListener]] ''<translate>registers a listener function</translate>''<br/><!-- GIDEROSMTD:EventDispatcher:addEventListener(type,listener,data) registers a listener function --><br />
[[Special:MyLanguage/EventDispatcher:dispatchEvent|EventDispatcher:dispatchEvent]] ''<translate>dispatches an event</translate>''<br/><!-- GIDEROSMTD:EventDispatcher:dispatchEvent(event) dispatches an event --><br />
[[Special:MyLanguage/EventDispatcher:hasEventListener|EventDispatcher:hasEventListener]] ''<translate>checks if the EventDispatcher object has a event listener</translate>''<br/><!-- GIDEROSMTD:EventDispatcher:hasEventListener(type) checks if the EventDispatcher object has a event listener --><br />
[[Special:MyLanguage/EventDispatcher:removeAllListeners|EventDispatcher:removeAllListeners]] ''<translate>remove all listeners</translate>''<br/><!-- GIDEROSMTD:EventDispatcher:removeAllListeners() remove all listeners --><br />
[[Special:MyLanguage/EventDispatcher:removeEventListener|EventDispatcher:removeEventListener]] ''<translate>removes a listener function</translate>''<br/><!-- GIDEROSMTD:EventDispatcher:removeEventListener(type,listener,data) removes a listener function --><br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Events</translate> ===<br />
[[Special:MyLanguage/Event.APPLICATION_BACKGROUND|Event.APPLICATION_BACKGROUND]]<br/><!-- GIDEROSEVT:Event.APPLICATION_BACKGROUND applicationBackground--><br />
[[Special:MyLanguage/Event.APPLICATION_EXIT|Event.APPLICATION_EXIT]]<br/><!-- GIDEROSEVT:Event.APPLICATION_EXIT applicationExit--><br />
[[Special:MyLanguage/Event.APPLICATION_FOREGROUND|Event.APPLICATION_FOREGROUND]]<br/><!-- GIDEROSEVT:Event.APPLICATION_FOREGROUND applicationForeground--><br />
[[Special:MyLanguage/Event.APPLICATION_RESIZE|Event.APPLICATION_RESIZE]]<br/><!-- GIDEROSEVT:Event.APPLICATION_RESIZE applicationResize--><br />
[[Special:MyLanguage/Event.APPLICATION_RESUME|Event.APPLICATION_RESUME]]<br/><!-- GIDEROSEVT:Event.APPLICATION_RESUME applicationResume--><br />
[[Special:MyLanguage/Event.APPLICATION_START|Event.APPLICATION_START]]<br/><!-- GIDEROSEVT:Event.APPLICATION_START applicationStart--><br />
[[Special:MyLanguage/Event.APPLICATION_SUSPEND|Event.APPLICATION_SUSPEND]]<br/><!-- GIDEROSEVT:Event.APPLICATION_SUSPEND applicationSuspend--><br />
[[Special:MyLanguage/Event.MEMORY_WARNING|Event.MEMORY_WARNING]]<br/><!-- GIDEROSEVT:Event.MEMORY_WARNING memoryWarning--><br />
[[Special:MyLanguage/Event.OPEN_URL|Event.OPEN_URL]]<br/><!-- GIDEROSEVT:Event.OPEN_URL openUrl--><br />
=== <translate>Constants</translate> ===<br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=EventDispatcher&diff=12920EventDispatcher2018-11-01T10:28:13Z<p>PaulR: /* Examples */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:EventDispatcher --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
All classes that dispatch events inherit from [[Special:MyLanguage/EventDispatcher|EventDispatcher]]. The target of an event is a listener function and an optional data value.<br /><br />
When an event is dispatched, the registered function is called.<br /><br />
If the optional data value is given, it is used as a first parameter while calling the listener function.<br /><br />
Event dispatching and event targets are the core part of the Gideros event model. Different event types (such as [[Special:MyLanguage/Event.ENTER_FRAME|Event.ENTER_FRAME]], [[Special:MyLanguage/Event.TOUCHES_BEGIN|Event.TOUCHES_BEGIN]] or [[Special:MyLanguage/Event.MOUSE_DOWN|Event.MOUSE_DOWN]]) flow through the scene tree hierarchy differently. When a touch or mouse event occurs, Gideros dispatches an event object into the event flow from the root of the scene tree.<br /><br />
On the other hand, [[Special:MyLanguage/Event.ENTER_FRAME|Event.ENTER_FRAME]] event is dispatched to all [[Special:MyLanguage/Sprite|Sprite]] objects.<br /><br />
<br /><br />
If you want to define a class that dispatches events, you can inherit your class from [[Special:MyLanguage/EventDispatcher|EventDispatcher]].<br /></translate><br />
=== <translate>Examples</translate> ===<br />
'''Example'''<br/><br />
<source lang="lua">-- example 1<br />
ClassA = Core.class(EventDispatcher)<br />
ClassB = Core.class(EventDispatcher)<br />
<br />
function ClassA:funcA(event)<br />
print("funcA", self, event:getType(), event:getTarget())<br />
end<br />
<br />
local a = ClassA.new()<br />
local b = ClassB.new()<br />
<br />
b:addEventListener("myevent", a.funcA, a) -- when b dispatches an "myevent" event,<br />
-- a.funcA will be called with &#039;a&#039;<br />
-- as first parameter<br />
<br />
b:dispatchEvent(Event.new("myevent")) -- will print "funcA"<br />
<br />
<br />
-- example 2<br />
Ball = Core.class(Sprite)<br />
<br />
function Ball:onEnterFrame()<br />
self:setX(self:getX() 1)<br />
end<br />
<br />
ball = Ball.new()<br />
ball:addEventListener(Event.ENTER_FRAME, ball.onEnterFrame, ball)</source><br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/EventDispatcher.new|EventDispatcher.new]] ''<translate>creates a new EventDispatcher object</translate>''<br/><!-- GIDEROSMTD:EventDispatcher.new() creates a new EventDispatcher object --><br />
[[Special:MyLanguage/EventDispatcher:addEventListener|EventDispatcher:addEventListener]] ''<translate>registers a listener function</translate>''<br/><!-- GIDEROSMTD:EventDispatcher:addEventListener(type,listener,data) registers a listener function --><br />
[[Special:MyLanguage/EventDispatcher:dispatchEvent|EventDispatcher:dispatchEvent]] ''<translate>dispatches an event</translate>''<br/><!-- GIDEROSMTD:EventDispatcher:dispatchEvent(event) dispatches an event --><br />
[[Special:MyLanguage/EventDispatcher:hasEventListener|EventDispatcher:hasEventListener]] ''<translate>checks if the EventDispatcher object has a event listener</translate>''<br/><!-- GIDEROSMTD:EventDispatcher:hasEventListener(type) checks if the EventDispatcher object has a event listener --><br />
[[Special:MyLanguage/EventDispatcher:removeAllListeners|EventDispatcher:removeAllListeners]] ''<translate>remove all listeners</translate>''<br/><!-- GIDEROSMTD:EventDispatcher:removeAllListeners() remove all listeners --><br />
[[Special:MyLanguage/EventDispatcher:removeEventListener|EventDispatcher:removeEventListener]] ''<translate>removes a listener function</translate>''<br/><!-- GIDEROSMTD:EventDispatcher:removeEventListener(type,listener,data) removes a listener function --><br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Events</translate> ===<br />
[[Special:MyLanguage/Event.APPLICATION_BACKGROUND|Event.APPLICATION_BACKGROUND]]<br/><!-- GIDEROSEVT:Event.APPLICATION_BACKGROUND applicationBackground--><br />
[[Special:MyLanguage/Event.APPLICATION_EXIT|Event.APPLICATION_EXIT]]<br/><!-- GIDEROSEVT:Event.APPLICATION_EXIT applicationExit--><br />
[[Special:MyLanguage/Event.APPLICATION_FOREGROUND|Event.APPLICATION_FOREGROUND]]<br/><!-- GIDEROSEVT:Event.APPLICATION_FOREGROUND applicationForeground--><br />
[[Special:MyLanguage/Event.APPLICATION_RESIZE|Event.APPLICATION_RESIZE]]<br/><!-- GIDEROSEVT:Event.APPLICATION_RESIZE applicationResize--><br />
[[Special:MyLanguage/Event.APPLICATION_RESUME|Event.APPLICATION_RESUME]]<br/><!-- GIDEROSEVT:Event.APPLICATION_RESUME applicationResume--><br />
[[Special:MyLanguage/Event.APPLICATION_START|Event.APPLICATION_START]]<br/><!-- GIDEROSEVT:Event.APPLICATION_START applicationStart--><br />
[[Special:MyLanguage/Event.APPLICATION_SUSPEND|Event.APPLICATION_SUSPEND]]<br/><!-- GIDEROSEVT:Event.APPLICATION_SUSPEND applicationSuspend--><br />
[[Special:MyLanguage/Event.MEMORY_WARNING|Event.MEMORY_WARNING]]<br/><!-- GIDEROSEVT:Event.MEMORY_WARNING memoryWarning--><br />
[[Special:MyLanguage/Event.OPEN_URL|Event.OPEN_URL]]<br/><!-- GIDEROSEVT:Event.OPEN_URL openUrl--><br />
=== <translate>Constants</translate> ===<br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=Making_a_Plugin&diff=12919Making a Plugin2018-10-30T13:11:12Z<p>PaulR: Blanked the page</p>
<hr />
<div></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Making_a_Plugin&diff=12918Making a Plugin2018-10-30T13:10:51Z<p>PaulR: Created page with "The Gideros plugin system is used primarily to extend the functionality of the Gideros API, for example by writing a plugin that provides Lua bindings to an existing native li..."</p>
<hr />
<div>The Gideros plugin system is used primarily to extend the functionality of the Gideros API, for example by writing a plugin that provides Lua bindings to an existing native library. Although Gideros is open source, the plugin system keeps the size of the core lean and mean by allowing users to choose which plugins to export with which project. Here we'll walk through the process of creating a plugin.<br />
<br />
To start writing a plugin you need to first get your Gideros native development environment set up, by following [[Special:MyLanguage/Compiling Gideros Source|Compiling Gideros Source]]. You can start off with just the Desktop target, so only really need Qt and Git (and MSYS2 on Windows). But following through the instructions there will allow you to create and build plugins for all Gideros export targets.<br />
<br />
<div class="noautonum">__TOC__</div></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Sound&diff=12917Sound2018-10-26T21:15:02Z<p>PaulR: </p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:Sound --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
The [[Special:MyLanguage/Sound|Sound]] class lets you load and play WAV, MP3, MOD, XM, S3M and IT sound files.<br /><br />
Control of the playing sound is performed through the [[Special:MyLanguage/SoundChannel|SoundChannel]]<br /><br />
object.<br /><br />
<br /></translate><br />
=== <translate>Examples</translate> ===<br />
'''Example'''<br/><br />
<source lang="lua">local sound = Sound.new("music.mp3")<br />
<br />
local channel = sound:play()<br />
<br />
-- after some time --<br />
channel:stop()</source><br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/Sound.new|Sound.new]] ''<translate>creates a new Sound object</translate>''<br/><!-- GIDEROSMTD:Sound.new(filename) creates a new Sound object --><br />
[[Special:MyLanguage/Sound.setListenerPosition|Sound.setListenerPosition]] <br/><!-- GIDEROSMTD:Sound.setListenerPosition(x,y,z,vx,vy,vz,dx,dy,dz,ux,uy,uz) --><br />
[[Special:MyLanguage/Sound:getLength|Sound:getLength]] <br/><!-- GIDEROSMTD:Sound:getLength() --><br />
[[Special:MyLanguage/Sound:play|Sound:play]] ''<translate>creates a new SoundChannel object to play the sound</translate>''<br/><!-- GIDEROSMTD:Sound:play(startTime,looping,paused) creates a new SoundChannel object to play the sound --><br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Events</translate> ===<br />
=== <translate>Constants</translate> ===<br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=Application:set&diff=12882Application:set2018-10-19T23:04:39Z<p>PaulR: /* Description */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2015.7<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Sets the state of the desktop setting provided as string parameter.<br /><br />
<br /></translate><br />
<source lang="lua"><br />
application:set("windowTitle", "My lovely window title")<br />
</source><br />
<translate><br /><br />
<br/><br />
Get list of parameters that can be set with:<br />
</translate><br />
<source lang="lua"><br />
print(application:set("help"))<br />
</source><br />
<translate><br /><br />
Get help for individual settings with:<br />
</translate><br />
<source lang="lua"><br />
print(application:set("cursor","help"))<br />
</source></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Application&diff=12881Application2018-10-19T23:01:01Z<p>PaulR: /* Methods */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:Application --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
[[Special:MyLanguage/Application|Application]] class contains the common functions that&#039;s available to the current application. There is a global variable ''application'' of type [[Special:MyLanguage/Application|Application]] to access these functions.<br /><br />
<br /></translate><br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/Application:canOpenUrl|Application:canOpenUrl]] ''<translate>Tests if it is possible to open provided url</translate>''<br/><!-- GIDEROSMTD:Application:canOpenUrl(url) Tests if it is possible to open provided url --><br />
[[Special:MyLanguage/Application:configureFrustum|Application:configureFrustum]] ''<translate>Configure the projection for 3D perspective.</translate>''<br/><!-- GIDEROSMTD:Application:configureFrustum(fov,farplane) Configure the projection for 3D perspective. --><br />
[[Special:MyLanguage/Application:exit|Application:exit]] ''<translate>terminates the application</translate>''<br/><!-- GIDEROSMTD:Application:exit() terminates the application --><br />
[[Special:MyLanguage/Application:get|Application:get]] ''<translate>returns state of desktop setting</translate>''<br/><!-- GIDEROSMTD:Application:get(setting) returns state of desktop setting --><br />
[[Special:MyLanguage/Application:getApiVersion|Application:getApiVersion]] ''<translate>returns the API version</translate>''<br/><!-- GIDEROSMTD:Application:getApiVersion() returns the API version --><br />
[[Special:MyLanguage/Application:getAppId|Application:getAppId]] ''<translate>returns the app id or bundle id</translate>''<br/><!-- GIDEROSMTD:Application:getAppId() returns the app id or bundle id --><br />
[[Special:MyLanguage/Application:getBackgroundColor|Application:getBackgroundColor]] ''<translate>returns the background color in hexadecimal format</translate>''<br/><!-- GIDEROSMTD:Application:getBackgroundColor() returns the background color in hexadecimal format --><br />
[[Special:MyLanguage/Application:getContentHeight|Application:getContentHeight]] ''<translate>returns content height</translate>''<br/><!-- GIDEROSMTD:Application:getContentHeight() returns content height --><br />
[[Special:MyLanguage/Application:getContentWidth|Application:getContentWidth]] ''<translate>returns content width</translate>''<br/><!-- GIDEROSMTD:Application:getContentWidth() returns content width --><br />
[[Special:MyLanguage/Application:getDeviceHeight|Application:getDeviceHeight]] ''<translate>returns the physical height of the device in pixels</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceHeight() returns the physical height of the device in pixels --><br />
[[Special:MyLanguage/Application:getDeviceInfo|Application:getDeviceInfo]] ''<translate>returns information about device</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceInfo() returns information about device --><br />
[[Special:MyLanguage/Application:getDeviceOrientation|Application:getDeviceOrientation]] ''<translate>Get the device orientation</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceOrientation() Get the device orientation --><br />
[[Special:MyLanguage/Application:getDeviceSafeArea|Application:getDeviceSafeArea]] ''<translate>returns the safe display area bounds</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceSafeArea(logical) returns the safe display area bounds --><br />
[[Special:MyLanguage/Application:getDeviceWidth|Application:getDeviceWidth]] ''<translate>returns the physical width of the device in pixels</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceWidth() returns the physical width of the device in pixels --><br />
[[Special:MyLanguage/Application:getFps|Application:getFps]] ''<translate>returns the frame rate of the application</translate>''<br/><!-- GIDEROSMTD:Application:getFps() returns the frame rate of the application --><br />
[[Special:MyLanguage/Application:getLanguage|Application:getLanguage]] ''<translate>returns the user language</translate>''<br/><!-- GIDEROSMTD:Application:getLanguage() returns the user language --><br />
[[Special:MyLanguage/Application:getLocale|Application:getLocale]] ''<translate>returns the device locale</translate>''<br/><!-- GIDEROSMTD:Application:getLocale() returns the device locale --><br />
[[Special:MyLanguage/Application:getLogicalBounds|Application:getLogicalBounds]] ''<translate>returns the physical screen bounds in logical space</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalBounds() returns the physical screen bounds in logical space --><br />
[[Special:MyLanguage/Application:getLogicalHeight|Application:getLogicalHeight]] ''<translate>returns the logical height of the application</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalHeight() returns the logical height of the application --><br />
[[Special:MyLanguage/Application:getLogicalScaleX|Application:getLogicalScaleX]] ''<translate>returns the scaling of automatic screen scaling on the x-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalScaleX() returns the scaling of automatic screen scaling on the x-axis --><br />
[[Special:MyLanguage/Application:getLogicalScaleY|Application:getLogicalScaleY]] ''<translate>returns the scaling of automatic screen scaling on the y-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalScaleY() returns the scaling of automatic screen scaling on the y-axis --><br />
[[Special:MyLanguage/Application:getLogicalTranslateX|Application:getLogicalTranslateX]] ''<translate>returns the translation of automatic screen scaling on the x-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalTranslateX() returns the translation of automatic screen scaling on the x-axis --><br />
[[Special:MyLanguage/Application:getLogicalTranslateY|Application:getLogicalTranslateY]] ''<translate>returns the translation of automatic screen scaling on the y-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalTranslateY() returns the translation of automatic screen scaling on the y-axis --><br />
[[Special:MyLanguage/Application:getLogicalWidth|Application:getLogicalWidth]] ''<translate>returns the logical width of the application</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalWidth() returns the logical width of the application --><br />
[[Special:MyLanguage/Application:getOrientation|Application:getOrientation]] ''<translate>returns the orientation of the application</translate>''<br/><!-- GIDEROSMTD:Application:getOrientation() returns the orientation of the application --><br />
[[Special:MyLanguage/Application:getScaleMode|Application:getScaleMode]] ''<translate>returns the automatic scale mode of the application</translate>''<br/><!-- GIDEROSMTD:Application:getScaleMode() returns the automatic scale mode of the application --><br />
[[Special:MyLanguage/Application:getScreenDensity|Application:getScreenDensity]] ''<translate>returns the screen density in pixels per inch</translate>''<br/><!-- GIDEROSMTD:Application:getScreenDensity() returns the screen density in pixels per inch --><br />
[[Special:MyLanguage/Application:getTextureMemoryUsage|Application:getTextureMemoryUsage]] ''<translate>returns the texture memory usage in Kbytes</translate>''<br/><!-- GIDEROSMTD:Application:getTextureMemoryUsage() returns the texture memory usage in Kbytes --><br />
[[Special:MyLanguage/Application:isPlayerMode|Application:isPlayerMode]] ''<translate>Check if app runs on player</translate>''<br/><!-- GIDEROSMTD:Application:isPlayerMode() Check if app runs on player --><br />
[[Special:MyLanguage/Application:openUrl|Application:openUrl]] ''<translate>opens the given URL in the appropriate application</translate>''<br/><!-- GIDEROSMTD:Application:openUrl(url) opens the given URL in the appropriate application --><br />
[[Special:MyLanguage/Application:set|Application:set]] ''<translate>sets state of desktop settings</translate>''<br/><!-- GIDEROSMTD:Application:set(setting, values) Sets state of desktop settings --><br />
[[Special:MyLanguage/Application:setBackgroundColor|Application:setBackgroundColor]] ''<translate>sets the background color in hexadecimal format</translate>''<br/><!-- GIDEROSMTD:Application:setBackgroundColor(color) sets the background color in hexadecimal format --><br />
[[Special:MyLanguage/Application:setFps|Application:setFps]] ''<translate>sets the frame rate of the application</translate>''<br/><!-- GIDEROSMTD:Application:setFps(fps) sets the frame rate of the application --><br />
[[Special:MyLanguage/Application:setFullScreen|Application:setFullScreen]] ''<translate>Full screen or window mode</translate>''<br/><!-- GIDEROSMTD:Application:setFullScreen(fullscreen) Full screen or window mode --><br />
[[Special:MyLanguage/Application:setKeepAwake|Application:setKeepAwake]] ''<translate>enables/disables screen dimming and device sleeping</translate>''<br/><!-- GIDEROSMTD:Application:setKeepAwake(keepAwake) enables/disables screen dimming and device sleeping --><br />
[[Special:MyLanguage/Application:setKeyboardVisibility|Application:setKeyboardVisibility]] <br/><!-- GIDEROSMTD:Application:setKeyboardVisibility(visible) --><br />
[[Special:MyLanguage/Application:setLogicalDimensions|Application:setLogicalDimensions]] ''<translate>sets the logical dimensions of the application</translate>''<br/><!-- GIDEROSMTD:Application:setLogicalDimensions(width,height) sets the logical dimensions of the application --><br />
[[Special:MyLanguage/Application:setOrientation|Application:setOrientation]] ''<translate>sets the orientation of the application</translate>''<br/><!-- GIDEROSMTD:Application:setOrientation(orientation) sets the orientation of the application --><br />
[[Special:MyLanguage/Application:setScaleMode|Application:setScaleMode]] ''<translate>sets the automatic scale mode of the application</translate>''<br/><!-- GIDEROSMTD:Application:setScaleMode(scaleMode) sets the automatic scale mode of the application --><br />
[[Special:MyLanguage/Application:setWindowSize|Application:setWindowSize]] ''<translate>Sets desktop window to a specific size</translate>''<br/><!-- GIDEROSMTD:Application:setWindowSize(width,height) Sets desktop window to a specific size --><br />
[[Special:MyLanguage/Application:vibrate|Application:vibrate]] ''<translate>vibrates the device</translate>''<br/><!-- GIDEROSMTD:Application:vibrate(ms) vibrates the device --><br />
| style="width: 50%; vertical-align:top;"|<br />
<br />
=== <translate>Events</translate> ===<br />
=== <translate>Constants</translate> ===<br />
[[Special:MyLanguage/Application.LANDSCAPE_LEFT|Application.LANDSCAPE_LEFT]]<br/><!-- GIDEROSCST:Application.LANDSCAPE_LEFT landscapeLeft--><br />
[[Special:MyLanguage/Application.LANDSCAPE_RIGHT|Application.LANDSCAPE_RIGHT]]<br/><!-- GIDEROSCST:Application.LANDSCAPE_RIGHT landscapeRight--><br />
[[Special:MyLanguage/Application.PORTRAIT|Application.PORTRAIT]]<br/><!-- GIDEROSCST:Application.PORTRAIT portrait--><br />
[[Special:MyLanguage/Application.PORTRAIT_UPSIDE_DOWN|Application.PORTRAIT_UPSIDE_DOWN]]<br/><!-- GIDEROSCST:Application.PORTRAIT_UPSIDE_DOWN portraitUpsideDown--><br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=Application&diff=12880Application2018-10-19T23:00:22Z<p>PaulR: /* Methods */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:Application --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
[[Special:MyLanguage/Application|Application]] class contains the common functions that&#039;s available to the current application. There is a global variable ''application'' of type [[Special:MyLanguage/Application|Application]] to access these functions.<br /><br />
<br /></translate><br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/Application:canOpenUrl|Application:canOpenUrl]] ''<translate>Tests if it is possible to open provided url</translate>''<br/><!-- GIDEROSMTD:Application:canOpenUrl(url) Tests if it is possible to open provided url --><br />
[[Special:MyLanguage/Application:configureFrustum|Application:configureFrustum]] ''<translate>Configure the projection for 3D perspective.</translate>''<br/><!-- GIDEROSMTD:Application:configureFrustum(fov,farplane) Configure the projection for 3D perspective. --><br />
[[Special:MyLanguage/Application:exit|Application:exit]] ''<translate>terminates the application</translate>''<br/><!-- GIDEROSMTD:Application:exit() terminates the application --><br />
[[Special:MyLanguage/Application:get|Application:get]] ''<translate>returns state of desktop setting</translate>''<br/><!-- GIDEROSMTD:Application:get(setting) returns state of desktop setting --><br />
[[Special:MyLanguage/Application:getApiVersion|Application:getApiVersion]] ''<translate>returns the API version</translate>''<br/><!-- GIDEROSMTD:Application:getApiVersion() returns the API version --><br />
[[Special:MyLanguage/Application:getAppId|Application:getAppId]] ''<translate>returns the app id or bundle id</translate>''<br/><!-- GIDEROSMTD:Application:getAppId() returns the app id or bundle id --><br />
[[Special:MyLanguage/Application:getBackgroundColor|Application:getBackgroundColor]] ''<translate>returns the background color in hexadecimal format</translate>''<br/><!-- GIDEROSMTD:Application:getBackgroundColor() returns the background color in hexadecimal format --><br />
[[Special:MyLanguage/Application:getContentHeight|Application:getContentHeight]] ''<translate>returns content height</translate>''<br/><!-- GIDEROSMTD:Application:getContentHeight() returns content height --><br />
[[Special:MyLanguage/Application:getContentWidth|Application:getContentWidth]] ''<translate>returns content width</translate>''<br/><!-- GIDEROSMTD:Application:getContentWidth() returns content width --><br />
[[Special:MyLanguage/Application:getDeviceHeight|Application:getDeviceHeight]] ''<translate>returns the physical height of the device in pixels</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceHeight() returns the physical height of the device in pixels --><br />
[[Special:MyLanguage/Application:getDeviceInfo|Application:getDeviceInfo]] ''<translate>returns information about device</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceInfo() returns information about device --><br />
[[Special:MyLanguage/Application:getDeviceOrientation|Application:getDeviceOrientation]] ''<translate>Get the device orientation</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceOrientation() Get the device orientation --><br />
[[Special:MyLanguage/Application:getDeviceSafeArea|Application:getDeviceSafeArea]] ''<translate>returns the safe display area bounds</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceSafeArea(logical) returns the safe display area bounds --><br />
[[Special:MyLanguage/Application:getDeviceWidth|Application:getDeviceWidth]] ''<translate>returns the physical width of the device in pixels</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceWidth() returns the physical width of the device in pixels --><br />
[[Special:MyLanguage/Application:getFps|Application:getFps]] ''<translate>returns the frame rate of the application</translate>''<br/><!-- GIDEROSMTD:Application:getFps() returns the frame rate of the application --><br />
[[Special:MyLanguage/Application:getLanguage|Application:getLanguage]] ''<translate>returns the user language</translate>''<br/><!-- GIDEROSMTD:Application:getLanguage() returns the user language --><br />
[[Special:MyLanguage/Application:getLocale|Application:getLocale]] ''<translate>returns the device locale</translate>''<br/><!-- GIDEROSMTD:Application:getLocale() returns the device locale --><br />
[[Special:MyLanguage/Application:getLogicalBounds|Application:getLogicalBounds]] ''<translate>returns the physical screen bounds in logical space</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalBounds() returns the physical screen bounds in logical space --><br />
[[Special:MyLanguage/Application:getLogicalHeight|Application:getLogicalHeight]] ''<translate>returns the logical height of the application</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalHeight() returns the logical height of the application --><br />
[[Special:MyLanguage/Application:getLogicalScaleX|Application:getLogicalScaleX]] ''<translate>returns the scaling of automatic screen scaling on the x-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalScaleX() returns the scaling of automatic screen scaling on the x-axis --><br />
[[Special:MyLanguage/Application:getLogicalScaleY|Application:getLogicalScaleY]] ''<translate>returns the scaling of automatic screen scaling on the y-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalScaleY() returns the scaling of automatic screen scaling on the y-axis --><br />
[[Special:MyLanguage/Application:getLogicalTranslateX|Application:getLogicalTranslateX]] ''<translate>returns the translation of automatic screen scaling on the x-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalTranslateX() returns the translation of automatic screen scaling on the x-axis --><br />
[[Special:MyLanguage/Application:getLogicalTranslateY|Application:getLogicalTranslateY]] ''<translate>returns the translation of automatic screen scaling on the y-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalTranslateY() returns the translation of automatic screen scaling on the y-axis --><br />
[[Special:MyLanguage/Application:getLogicalWidth|Application:getLogicalWidth]] ''<translate>returns the logical width of the application</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalWidth() returns the logical width of the application --><br />
[[Special:MyLanguage/Application:getOrientation|Application:getOrientation]] ''<translate>returns the orientation of the application</translate>''<br/><!-- GIDEROSMTD:Application:getOrientation() returns the orientation of the application --><br />
[[Special:MyLanguage/Application:getScaleMode|Application:getScaleMode]] ''<translate>returns the automatic scale mode of the application</translate>''<br/><!-- GIDEROSMTD:Application:getScaleMode() returns the automatic scale mode of the application --><br />
[[Special:MyLanguage/Application:getScreenDensity|Application:getScreenDensity]] ''<translate>returns the screen density in pixels per inch</translate>''<br/><!-- GIDEROSMTD:Application:getScreenDensity() returns the screen density in pixels per inch --><br />
[[Special:MyLanguage/Application:getTextureMemoryUsage|Application:getTextureMemoryUsage]] ''<translate>returns the texture memory usage in Kbytes</translate>''<br/><!-- GIDEROSMTD:Application:getTextureMemoryUsage() returns the texture memory usage in Kbytes --><br />
[[Special:MyLanguage/Application:isPlayerMode|Application:isPlayerMode]] ''<translate>Check if app runs on player</translate>''<br/><!-- GIDEROSMTD:Application:isPlayerMode() Check if app runs on player --><br />
[[Special:MyLanguage/Application:openUrl|Application:openUrl]] ''<translate>opens the given URL in the appropriate application</translate>''<br/><!-- GIDEROSMTD:Application:openUrl(url) opens the given URL in the appropriate application --><br />
[[Special:MyLanguage/Application:get|Application:set]] ''<translate>sets state of desktop settings</translate>''<br/><!-- GIDEROSMTD:Application:set(setting, values) Sets state of desktop settings --><br />
[[Special:MyLanguage/Application:setBackgroundColor|Application:setBackgroundColor]] ''<translate>sets the background color in hexadecimal format</translate>''<br/><!-- GIDEROSMTD:Application:setBackgroundColor(color) sets the background color in hexadecimal format --><br />
[[Special:MyLanguage/Application:setFps|Application:setFps]] ''<translate>sets the frame rate of the application</translate>''<br/><!-- GIDEROSMTD:Application:setFps(fps) sets the frame rate of the application --><br />
[[Special:MyLanguage/Application:setFullScreen|Application:setFullScreen]] ''<translate>Full screen or window mode</translate>''<br/><!-- GIDEROSMTD:Application:setFullScreen(fullscreen) Full screen or window mode --><br />
[[Special:MyLanguage/Application:setKeepAwake|Application:setKeepAwake]] ''<translate>enables/disables screen dimming and device sleeping</translate>''<br/><!-- GIDEROSMTD:Application:setKeepAwake(keepAwake) enables/disables screen dimming and device sleeping --><br />
[[Special:MyLanguage/Application:setKeyboardVisibility|Application:setKeyboardVisibility]] <br/><!-- GIDEROSMTD:Application:setKeyboardVisibility(visible) --><br />
[[Special:MyLanguage/Application:setLogicalDimensions|Application:setLogicalDimensions]] ''<translate>sets the logical dimensions of the application</translate>''<br/><!-- GIDEROSMTD:Application:setLogicalDimensions(width,height) sets the logical dimensions of the application --><br />
[[Special:MyLanguage/Application:setOrientation|Application:setOrientation]] ''<translate>sets the orientation of the application</translate>''<br/><!-- GIDEROSMTD:Application:setOrientation(orientation) sets the orientation of the application --><br />
[[Special:MyLanguage/Application:setScaleMode|Application:setScaleMode]] ''<translate>sets the automatic scale mode of the application</translate>''<br/><!-- GIDEROSMTD:Application:setScaleMode(scaleMode) sets the automatic scale mode of the application --><br />
[[Special:MyLanguage/Application:setWindowSize|Application:setWindowSize]] ''<translate>Sets desktop window to a specific size</translate>''<br/><!-- GIDEROSMTD:Application:setWindowSize(width,height) Sets desktop window to a specific size --><br />
[[Special:MyLanguage/Application:vibrate|Application:vibrate]] ''<translate>vibrates the device</translate>''<br/><!-- GIDEROSMTD:Application:vibrate(ms) vibrates the device --><br />
| style="width: 50%; vertical-align:top;"|<br />
<br />
=== <translate>Events</translate> ===<br />
=== <translate>Constants</translate> ===<br />
[[Special:MyLanguage/Application.LANDSCAPE_LEFT|Application.LANDSCAPE_LEFT]]<br/><!-- GIDEROSCST:Application.LANDSCAPE_LEFT landscapeLeft--><br />
[[Special:MyLanguage/Application.LANDSCAPE_RIGHT|Application.LANDSCAPE_RIGHT]]<br/><!-- GIDEROSCST:Application.LANDSCAPE_RIGHT landscapeRight--><br />
[[Special:MyLanguage/Application.PORTRAIT|Application.PORTRAIT]]<br/><!-- GIDEROSCST:Application.PORTRAIT portrait--><br />
[[Special:MyLanguage/Application.PORTRAIT_UPSIDE_DOWN|Application.PORTRAIT_UPSIDE_DOWN]]<br/><!-- GIDEROSCST:Application.PORTRAIT_UPSIDE_DOWN portraitUpsideDown--><br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=Application:set&diff=12879Application:set2018-10-19T22:57:50Z<p>PaulR: Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.7<br/> '''<translate>Class</translate>:''' Application<br..."</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2015.7<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Sets the state of the desktop setting provided as string parameter.<br /><br />
<br /></translate><br />
<source lang="lua"><br />
application:set("windowTitle", "My lovely window title")<br />
</source><br />
<translate><br /><br />
Get list of parameters that can be set with:<br />
</translate><br />
<source lang="lua"><br />
print(application:set("help"))<br />
</source></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Application:get&diff=12878Application:get2018-10-19T22:53:52Z<p>PaulR: Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.7<br/> '''<translate>Class</translate>:''' Application<br..."</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2015.7<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Returns the state of the desktop setting provided as string parameter.<br /><br />
<br /></translate><br />
<source lang="lua"><br />
-- print list of all available settings<br />
print(application:get("help"))<br />
</source></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Application&diff=12877Application2018-10-19T22:50:06Z<p>PaulR: /* Methods */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:Application --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
[[Special:MyLanguage/Application|Application]] class contains the common functions that&#039;s available to the current application. There is a global variable ''application'' of type [[Special:MyLanguage/Application|Application]] to access these functions.<br /><br />
<br /></translate><br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/Application:canOpenUrl|Application:canOpenUrl]] ''<translate>Tests if it is possible to open provided url</translate>''<br/><!-- GIDEROSMTD:Application:canOpenUrl(url) Tests if it is possible to open provided url --><br />
[[Special:MyLanguage/Application:configureFrustum|Application:configureFrustum]] ''<translate>Configure the projection for 3D perspective.</translate>''<br/><!-- GIDEROSMTD:Application:configureFrustum(fov,farplane) Configure the projection for 3D perspective. --><br />
[[Special:MyLanguage/Application:exit|Application:exit]] ''<translate>terminates the application</translate>''<br/><!-- GIDEROSMTD:Application:exit() terminates the application --><br />
[[Special:MyLanguage/Application:get|Application:get]] ''<translate>returns state of desktop setting</translate>''<br/><!-- GIDEROSMTD:Application:get(setting) returns state of desktop setting --><br />
[[Special:MyLanguage/Application:getApiVersion|Application:getApiVersion]] ''<translate>returns the API version</translate>''<br/><!-- GIDEROSMTD:Application:getApiVersion() returns the API version --><br />
[[Special:MyLanguage/Application:getAppId|Application:getAppId]] ''<translate>returns the app id or bundle id</translate>''<br/><!-- GIDEROSMTD:Application:getAppId() returns the app id or bundle id --><br />
[[Special:MyLanguage/Application:getBackgroundColor|Application:getBackgroundColor]] ''<translate>returns the background color in hexadecimal format</translate>''<br/><!-- GIDEROSMTD:Application:getBackgroundColor() returns the background color in hexadecimal format --><br />
[[Special:MyLanguage/Application:getContentHeight|Application:getContentHeight]] ''<translate>returns content height</translate>''<br/><!-- GIDEROSMTD:Application:getContentHeight() returns content height --><br />
[[Special:MyLanguage/Application:getContentWidth|Application:getContentWidth]] ''<translate>returns content width</translate>''<br/><!-- GIDEROSMTD:Application:getContentWidth() returns content width --><br />
[[Special:MyLanguage/Application:getDeviceHeight|Application:getDeviceHeight]] ''<translate>returns the physical height of the device in pixels</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceHeight() returns the physical height of the device in pixels --><br />
[[Special:MyLanguage/Application:getDeviceInfo|Application:getDeviceInfo]] ''<translate>returns information about device</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceInfo() returns information about device --><br />
[[Special:MyLanguage/Application:getDeviceOrientation|Application:getDeviceOrientation]] ''<translate>Get the device orientation</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceOrientation() Get the device orientation --><br />
[[Special:MyLanguage/Application:getDeviceSafeArea|Application:getDeviceSafeArea]] ''<translate>returns the safe display area bounds</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceSafeArea(logical) returns the safe display area bounds --><br />
[[Special:MyLanguage/Application:getDeviceWidth|Application:getDeviceWidth]] ''<translate>returns the physical width of the device in pixels</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceWidth() returns the physical width of the device in pixels --><br />
[[Special:MyLanguage/Application:getFps|Application:getFps]] ''<translate>returns the frame rate of the application</translate>''<br/><!-- GIDEROSMTD:Application:getFps() returns the frame rate of the application --><br />
[[Special:MyLanguage/Application:getLanguage|Application:getLanguage]] ''<translate>returns the user language</translate>''<br/><!-- GIDEROSMTD:Application:getLanguage() returns the user language --><br />
[[Special:MyLanguage/Application:getLocale|Application:getLocale]] ''<translate>returns the device locale</translate>''<br/><!-- GIDEROSMTD:Application:getLocale() returns the device locale --><br />
[[Special:MyLanguage/Application:getLogicalBounds|Application:getLogicalBounds]] ''<translate>returns the physical screen bounds in logical space</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalBounds() returns the physical screen bounds in logical space --><br />
[[Special:MyLanguage/Application:getLogicalHeight|Application:getLogicalHeight]] ''<translate>returns the logical height of the application</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalHeight() returns the logical height of the application --><br />
[[Special:MyLanguage/Application:getLogicalScaleX|Application:getLogicalScaleX]] ''<translate>returns the scaling of automatic screen scaling on the x-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalScaleX() returns the scaling of automatic screen scaling on the x-axis --><br />
[[Special:MyLanguage/Application:getLogicalScaleY|Application:getLogicalScaleY]] ''<translate>returns the scaling of automatic screen scaling on the y-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalScaleY() returns the scaling of automatic screen scaling on the y-axis --><br />
[[Special:MyLanguage/Application:getLogicalTranslateX|Application:getLogicalTranslateX]] ''<translate>returns the translation of automatic screen scaling on the x-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalTranslateX() returns the translation of automatic screen scaling on the x-axis --><br />
[[Special:MyLanguage/Application:getLogicalTranslateY|Application:getLogicalTranslateY]] ''<translate>returns the translation of automatic screen scaling on the y-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalTranslateY() returns the translation of automatic screen scaling on the y-axis --><br />
[[Special:MyLanguage/Application:getLogicalWidth|Application:getLogicalWidth]] ''<translate>returns the logical width of the application</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalWidth() returns the logical width of the application --><br />
[[Special:MyLanguage/Application:getOrientation|Application:getOrientation]] ''<translate>returns the orientation of the application</translate>''<br/><!-- GIDEROSMTD:Application:getOrientation() returns the orientation of the application --><br />
[[Special:MyLanguage/Application:getScaleMode|Application:getScaleMode]] ''<translate>returns the automatic scale mode of the application</translate>''<br/><!-- GIDEROSMTD:Application:getScaleMode() returns the automatic scale mode of the application --><br />
[[Special:MyLanguage/Application:getScreenDensity|Application:getScreenDensity]] ''<translate>returns the screen density in pixels per inch</translate>''<br/><!-- GIDEROSMTD:Application:getScreenDensity() returns the screen density in pixels per inch --><br />
[[Special:MyLanguage/Application:getTextureMemoryUsage|Application:getTextureMemoryUsage]] ''<translate>returns the texture memory usage in Kbytes</translate>''<br/><!-- GIDEROSMTD:Application:getTextureMemoryUsage() returns the texture memory usage in Kbytes --><br />
[[Special:MyLanguage/Application:isPlayerMode|Application:isPlayerMode]] ''<translate>Check if app runs on player</translate>''<br/><!-- GIDEROSMTD:Application:isPlayerMode() Check if app runs on player --><br />
[[Special:MyLanguage/Application:openUrl|Application:openUrl]] ''<translate>opens the given URL in the appropriate application</translate>''<br/><!-- GIDEROSMTD:Application:openUrl(url) opens the given URL in the appropriate application --><br />
[[Special:MyLanguage/Application:setBackgroundColor|Application:setBackgroundColor]] ''<translate>sets the background color in hexadecimal format</translate>''<br/><!-- GIDEROSMTD:Application:setBackgroundColor(color) sets the background color in hexadecimal format --><br />
[[Special:MyLanguage/Application:setFps|Application:setFps]] ''<translate>sets the frame rate of the application</translate>''<br/><!-- GIDEROSMTD:Application:setFps(fps) sets the frame rate of the application --><br />
[[Special:MyLanguage/Application:setFullScreen|Application:setFullScreen]] ''<translate>Full screen or window mode</translate>''<br/><!-- GIDEROSMTD:Application:setFullScreen(fullscreen) Full screen or window mode --><br />
[[Special:MyLanguage/Application:setKeepAwake|Application:setKeepAwake]] ''<translate>enables/disables screen dimming and device sleeping</translate>''<br/><!-- GIDEROSMTD:Application:setKeepAwake(keepAwake) enables/disables screen dimming and device sleeping --><br />
[[Special:MyLanguage/Application:setKeyboardVisibility|Application:setKeyboardVisibility]] <br/><!-- GIDEROSMTD:Application:setKeyboardVisibility(visible) --><br />
[[Special:MyLanguage/Application:setLogicalDimensions|Application:setLogicalDimensions]] ''<translate>sets the logical dimensions of the application</translate>''<br/><!-- GIDEROSMTD:Application:setLogicalDimensions(width,height) sets the logical dimensions of the application --><br />
[[Special:MyLanguage/Application:setOrientation|Application:setOrientation]] ''<translate>sets the orientation of the application</translate>''<br/><!-- GIDEROSMTD:Application:setOrientation(orientation) sets the orientation of the application --><br />
[[Special:MyLanguage/Application:setScaleMode|Application:setScaleMode]] ''<translate>sets the automatic scale mode of the application</translate>''<br/><!-- GIDEROSMTD:Application:setScaleMode(scaleMode) sets the automatic scale mode of the application --><br />
[[Special:MyLanguage/Application:setWindowSize|Application:setWindowSize]] ''<translate>Sets desktop window to a specific size</translate>''<br/><!-- GIDEROSMTD:Application:setWindowSize(width,height) Sets desktop window to a specific size --><br />
[[Special:MyLanguage/Application:vibrate|Application:vibrate]] ''<translate>vibrates the device</translate>''<br/><!-- GIDEROSMTD:Application:vibrate(ms) vibrates the device --><br />
| style="width: 50%; vertical-align:top;"|<br />
<br />
=== <translate>Events</translate> ===<br />
=== <translate>Constants</translate> ===<br />
[[Special:MyLanguage/Application.LANDSCAPE_LEFT|Application.LANDSCAPE_LEFT]]<br/><!-- GIDEROSCST:Application.LANDSCAPE_LEFT landscapeLeft--><br />
[[Special:MyLanguage/Application.LANDSCAPE_RIGHT|Application.LANDSCAPE_RIGHT]]<br/><!-- GIDEROSCST:Application.LANDSCAPE_RIGHT landscapeRight--><br />
[[Special:MyLanguage/Application.PORTRAIT|Application.PORTRAIT]]<br/><!-- GIDEROSCST:Application.PORTRAIT portrait--><br />
[[Special:MyLanguage/Application.PORTRAIT_UPSIDE_DOWN|Application.PORTRAIT_UPSIDE_DOWN]]<br/><!-- GIDEROSCST:Application.PORTRAIT_UPSIDE_DOWN portraitUpsideDown--><br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=Screen&diff=12876Screen2018-10-18T23:11:50Z<p>PaulR: </p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:Screen --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/><br />
'''<translate>Available since</translate>:''' Gideros 2017.8<br/><br />
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate>Screen class allows to access secondary displays or windows.</translate><br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/Screen.new|Screen.new]] ''<translate>Open a new screen</translate>''<br/><!-- GIDEROSMTD:Screen.new(id) Open a new screen --><br />
[[Special:MyLanguage/Screen:clear|Screen:clear]] ''<translate>Sets the background color of this screen</translate>''<br/><!-- GIDEROSMTD:Screen:clear(color,alpha) Sets the background color of this screen --><br />
[[Special:MyLanguage/Screen:getId|Screen:getId]] ''<translate>Returns the screen's id</translate>''<br/><!-- GIDEROSMTD:Screen:getId() Returns the screen's id --><br />
[[Special:MyLanguage/Screen:getMaxSize|Screen:getMaxSize]] ''<translate>Returns the maximum size this screen can have</translate>''<br/><!-- GIDEROSMTD:Screen:getMaxSize() Returns the maximum size this screen can have --><br />
[[Special:MyLanguage/Screen:getPosition|Screen:getPosition]] ''<translate>Returns the position of this screen</translate>''<br/><!-- GIDEROSMTD:Screen:getPosition() Returns the position of this screen --><br />
[[Special:MyLanguage/Screen:getSize|Screen:getSize]] ''<translate>Returns the size of this screen</translate>''<br/><!-- GIDEROSMTD:Screen:getSize() Returns the size of this screen --><br />
[[Special:MyLanguage/Screen:getState|Screen:getState]] ''<translate>Returns the state of this screen</translate>''<br/><!-- GIDEROSMTD:Screen:getState() Returns the state of this screen --><br />
[[Special:MyLanguage/Screen:setContent|Screen:setContent]] <br/><!-- GIDEROSMTD:Screen:setContent(content) --><br />
[[Special:MyLanguage/Screen:setPosition|Screen:setPosition]] ''<translate>Sets the position of this screen, if possible.</translate>''<br/><!-- GIDEROSMTD:Screen:setPosition(x,y) Sets the position of this screen, if possible. --><br />
[[Special:MyLanguage/Screen:setSize|Screen:setSize]] ''<translate>Sets the size of this screen, if possible.</translate>''<br/><!-- GIDEROSMTD:Screen:setSize(w,h) Sets the size of this screen, if possible. --><br />
[[Special:MyLanguage/Screen:setState|Screen:setState]] ''<translate>Sets the state of this screen, if possible.</translate>''<br/><!-- GIDEROSMTD:Screen:setState(state) Sets the state of this screen, if possible. --><br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Events</translate> ===<br />
=== <translate>Constants</translate> ===<br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=Thread&diff=12798Thread2018-10-06T22:04:03Z<p>PaulR: </p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:Thread --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform pc.png]][[File:Platform mac.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/><br />
'''<translate>Available since</translate>:''' 2018.10<br/><br />
=== <translate>Description</translate> ===<br />
<translate>Main Thread class that concurrent threads are created with and managed by. From [[Special:MyLanguage/Threads|Threads]] plugin.<br />
</translate><br/><br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/Thread.new|Thread.new]] ''<translate>Creates a new thread object.</translate>''<br/><!-- GIDEROSMTD:Thread.new() Creates a new thread object. --><br />
[[Special:MyLanguage/Thread:setFunction|Thread:setFunction]] ''<translate>Sets Lua function that thread will execute.</translate>''<br/><!-- GIDEROSMTD:Thread:setFunction(func) Sets Lua function that thread will execute. --><br />
[[Special:MyLanguage/Thread:execute|Thread:execute]] ''<translate>Starts/executes our thread</translate>''<br/><!-- GIDEROSMTD:Thread:execute(vararg) Starts/executes our thread --><br />
[[Special:MyLanguage/Thread:resume|Thread:resume]] ''<translate>Resumes a thread that has been yielded.</translate>''<br/><!-- GIDEROSMTD:Thread:resume(...) Resumes a thread that has been yielded. --><br />
[[Special:MyLanguage/Thread.yield|Thread.yield]] ''<translate>Pauses executions of thread (only a valid call inside thread function).</translate>''<br/><!-- GIDEROSMTD:Thread.yield(...) Pauses executions of thread (only a valid call inside thread function). --><br />
[[Special:MyLanguage/Thread:status|Thread:status]] ''<translate>Returns current status of the thread.</translate>''<br/><!-- GIDEROSMTD:Thread:status() Returns current status of the thread. --><br />
[[Special:MyLanguage/Thread:getNumLogicalCores|Thread:getNumLogicalCores]] ''<translate>Returns number of logical cores on host machine.</translate>''<br/><!-- GIDEROSMTD:Thread:getNumLogicalCores() Returns number of logical cores on host machine. --><br />
[[Special:MyLanguage/Thread:requestTermination|Thread:requestTermination]] ''<translate>Sets a flag to terminate thread.</translate>''<br/><!-- GIDEROSMTD:Thread:requestTermination() Sets a flag to terminate thread. --><br />
[[Special:MyLanguage/Thread.sendData|Thread.sendData]] ''<translate>Sends data for retrieval by main thread (only a valid call inside thread function).</translate>''<br/><!-- GIDEROSMTD:Thread.sendData(...) Sends data for retrieval by main thread (only a valid call inside thread function). --><br />
[[Special:MyLanguage/Thread:fetchData|Thread:fetchData]] ''<translate>Returns any data sent by thread sendData call.</translate>''<br/><!-- GIDEROSMTD:Thread:fetchData() Returns any data sent by thread sendData call. --><br />
[[Special:MyLanguage/Thread:getResults|Thread:getResults]] ''<translate>Get any results from thread.</translate>''<br/><!-- GIDEROSMTD:Thread:getResults(wait_time) Get any results from thread. --><br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Events</translate> ===<br />
<br />
''none''<br/><br />
<br />
=== <translate>Constants</translate> ===<br />
<br />
''none''<br/><br />
<br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=Thread&diff=12797Thread2018-10-06T22:01:54Z<p>PaulR: </p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:Thread --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform pc.png]][[File:Platform mac.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/><br />
'''<translate>Available since</translate>:''' 2018.10<br/><br />
=== <translate>Description</translate> ===<br />
<translate> Main Thread class that concurrent threads are created and managed by. From [[Special:MyLanguage/Threads|Threads]] plugin.<br />
</translate><br/><br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/Thread.new|Thread.new]] ''<translate>Creates a new thread object.</translate>''<br/><!-- GIDEROSMTD:Thread.new() Creates a new thread object. --><br />
[[Special:MyLanguage/Thread:setFunction|Thread:setFunction]] ''<translate>Sets Lua function that thread will execute.</translate>''<br/><!-- GIDEROSMTD:Thread:setFunction(func) Sets Lua function that thread will execute. --><br />
[[Special:MyLanguage/Thread:execute|Thread:execute]] ''<translate>Starts/executes our thread</translate>''<br/><!-- GIDEROSMTD:Thread:execute(vararg) Starts/executes our thread --><br />
[[Special:MyLanguage/Thread:resume|Thread:resume]] ''<translate>Resumes a thread that has been yielded.</translate>''<br/><!-- GIDEROSMTD:Thread:resume(...) Resumes a thread that has been yielded. --><br />
[[Special:MyLanguage/Thread.yield|Thread.yield]] ''<translate>Pauses executions of thread (only a valid call inside thread function).</translate>''<br/><!-- GIDEROSMTD:Thread.yield(...) Pauses executions of thread (only a valid call inside thread function). --><br />
[[Special:MyLanguage/Thread:status|Thread:status]] ''<translate>Returns current status of the thread.</translate>''<br/><!-- GIDEROSMTD:Thread:status() Returns current status of the thread. --><br />
[[Special:MyLanguage/Thread:getNumLogicalCores|Thread:getNumLogicalCores]] ''<translate>Returns number of logical cores on host machine.</translate>''<br/><!-- GIDEROSMTD:Thread:getNumLogicalCores() Returns number of logical cores on host machine. --><br />
[[Special:MyLanguage/Thread:requestTermination|Thread:requestTermination]] ''<translate>Sets a flag to terminate thread.</translate>''<br/><!-- GIDEROSMTD:Thread:requestTermination() Sets a flag to terminate thread. --><br />
[[Special:MyLanguage/Thread.sendData|Thread.sendData]] ''<translate>Sends data for retrieval by main thread (only a valid call inside thread function).</translate>''<br/><!-- GIDEROSMTD:Thread.sendData(...) Sends data for retrieval by main thread (only a valid call inside thread function). --><br />
[[Special:MyLanguage/Thread:fetchData|Thread:fetchData]] ''<translate>Returns any data sent by thread sendData call.</translate>''<br/><!-- GIDEROSMTD:Thread:fetchData() Returns any data sent by thread sendData call. --><br />
[[Special:MyLanguage/Thread:getResults|Thread:getResults]] ''<translate>Get any results from thread.</translate>''<br/><!-- GIDEROSMTD:Thread:getResults(wait_time) Get any results from thread. --><br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Events</translate> ===<br />
<br />
''none''<br/><br />
<br />
=== <translate>Constants</translate> ===<br />
<br />
''none''<br/><br />
<br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=Thread&diff=12796Thread2018-10-06T21:58:44Z<p>PaulR: Created page with "__NOTOC__ <languages /> <!-- GIDEROSOBJ:Thread --> '''<translate>Supported platforms</translate>:''' File:Platform android.pngFile:Platform ios.pngFile:Platform pc.p..."</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:Thread --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform pc.png]][[File:Platform mac.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/><br />
'''<translate>Available since</translate>:''' 2018.10<br/><br />
=== <translate>Description</translate> ===<br />
<translate> </translate><br/><br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/Thread.new|Thread.new]] ''<translate>Creates a new thread object.</translate>''<br/><!-- GIDEROSMTD:Thread.new() Creates a new thread object. --><br />
[[Special:MyLanguage/Thread:setFunction|Thread:setFunction]] ''<translate>Sets Lua function that thread will execute.</translate>''<br/><!-- GIDEROSMTD:Thread:setFunction(func) Sets Lua function that thread will execute. --><br />
[[Special:MyLanguage/Thread:execute|Thread:execute]] ''<translate>Starts/executes our thread</translate>''<br/><!-- GIDEROSMTD:Thread:execute(vararg) Starts/executes our thread --><br />
[[Special:MyLanguage/Thread:resume|Thread:resume]] ''<translate>Resumes a thread that has been yielded.</translate>''<br/><!-- GIDEROSMTD:Thread:resume(...) Resumes a thread that has been yielded. --><br />
[[Special:MyLanguage/Thread.yield|Thread.yield]] ''<translate>Pauses executions of thread (only a valid call inside thread function).</translate>''<br/><!-- GIDEROSMTD:Thread.yield(...) Pauses executions of thread (only a valid call inside thread function). --><br />
[[Special:MyLanguage/Thread:status|Thread:status]] ''<translate>Returns current status of the thread.</translate>''<br/><!-- GIDEROSMTD:Thread:status() Returns current status of the thread. --><br />
[[Special:MyLanguage/Thread:getNumLogicalCores|Thread:getNumLogicalCores]] ''<translate>Returns number of logical cores on host machine.</translate>''<br/><!-- GIDEROSMTD:Thread:getNumLogicalCores() Returns number of logical cores on host machine. --><br />
[[Special:MyLanguage/Thread:requestTermination|Thread:requestTermination]] ''<translate>Sets a flag to terminate thread.</translate>''<br/><!-- GIDEROSMTD:Thread:requestTermination() Sets a flag to terminate thread. --><br />
[[Special:MyLanguage/Thread.sendData|Thread.sendData]] ''<translate>Sends data for retrieval by main thread (only a valid call inside thread function).</translate>''<br/><!-- GIDEROSMTD:Thread.sendData(...) Sends data for retrieval by main thread (only a valid call inside thread function). --><br />
[[Special:MyLanguage/Thread:fetchData|Thread:fetchData]] ''<translate>Returns any data sent by thread sendData call.</translate>''<br/><!-- GIDEROSMTD:Thread:fetchData() Returns any data sent by thread sendData call. --><br />
[[Special:MyLanguage/Thread:getResults|Thread:getResults]] ''<translate>Get any results from thread.</translate>''<br/><!-- GIDEROSMTD:Thread:getResults(wait_time) Get any results from thread. --><br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Events</translate> ===<br />
<br />
''none''<br/><br />
<br />
=== <translate>Constants</translate> ===<br />
<br />
''none''<br/><br />
<br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=X_Threads&diff=12795X Threads2018-10-06T21:58:22Z<p>PaulR: </p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:Threads --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform pc.png]][[File:Platform mac.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/><br />
'''<translate>Available since</translate>:''' 2018.10<br/><br />
=== <translate>Description</translate> ===<br />
<translate>The Threads plugin provides the ability to run Lua code in separate threads, taking advantage of multiple cores where available.<br />
</translate><br/><br />
=== <translate>Example</translate> ===<br />
<br />
'''Simple example of getting result from thread.'''<br/><br />
<source lang="lua">require "Threads"<br />
local thread = Thread.new()<br />
thread:setFunction(function()<br />
local a<br />
for i = 1, 10000000 do<br />
a += 1<br />
end<br />
return i<br />
end)<br />
thread:execute()<br />
local ok = false<br />
while not ok do<br />
ok = thread:getResult()<br />
end<br />
print("woot!")<br />
</source><br />
<br />
=== <translate>Class</translate> ===<br />
[[Special:MyLanguage/Thread|Thread]]<br/></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Vogon&diff=12794Vogon2018-10-06T21:34:44Z<p>PaulR: </p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:Vogon --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform pc.png]][[File:Platform mac.png]][[File:Platform winrt.png]][[File:Platform win32.png]][[File:Platform html5.png]]<br/><br />
'''<translate>Available since</translate>:''' 2042.11<br/><br />
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Cryptography|Cryptography]]<br/><br />
<br />
=== <translate>Description</translate> ===<br />
<translate>Main Vogon class.<br />
</translate><br/><br />
=== <translate>Example</translate> ===<br />
<br />
'''Standard use of a Vogon.'''<br/><br />
<source lang="lua">require "Vogon"<br />
local vogon = Vogon.new()<br />
local poetry = vogon:writePoetry(topic)<br />
local number_of_deaths = vogon:recitePoetry()<br />
</source><br />
<br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/Vogon.new|Vogon.new]] ''<translate>Create a new Vogon</translate>''<br/><!-- GIDEROSMTD:Vogon.new() Create a new Vogon --><br />
[[Special:MyLanguage/Vogon:writePoetry|Vogon:writePoetry]] ''<translate>Creates abnormally long poem.</translate>''<br/><!-- GIDEROSMTD:Vogon:writePoetry(topic) Creates abnormally long poem. --><br />
[[Special:MyLanguage/Vogon:recitePoetry|Vogon:recitePoetry]] ''<translate>Recites the third worst poetry in the known universe.</translate>''<br/><!-- GIDEROSMTD:Vogon:recitePoetry() Recites the third worst poetry in the known universe. --><br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Events</translate> ===<br />
[[Special:MyLanguage/Vogon.DESTRUCTION_IMMINENT|Vogon.DESTRUCTION_IMMINENT]]<br/><br />
[[Special:MyLanguage/Vogon.DESTRUCTION_COMPLETE|Vogon.DESTRUCTION_COMPLETE]]<br/><br />
=== <translate>Constants</translate> ===<br />
[[Special:MyLanguage/Vogon.STATUS_SIGN_POSTED|Vogon.STATUS_SIGN_POSTED]]<br/><br />
[[Special:MyLanguage/Vogon.STATUS_DESTRUCTION_APPROVED|Vogon.STATUS_DESTRUCTION_APPROVED]]<br/><br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=Vogon&diff=12793Vogon2018-10-06T21:32:46Z<p>PaulR: </p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:Vogon --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform pc.png]][[File:Platform mac.png]][[File:Platform winrt.png]][[File:Platform win32.png]][[File:Platform html5.png]]<br/><br />
'''<translate>Available since</translate>:''' 2042.11<br/><br />
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Cryptography|Cryptography]]<br/><br />
<br />
=== <translate>Description</translate> ===<br />
<translate>This is just a test of docs gen from the create-wiki-pages.lua script in the plugins folder of the Gideros<br />
repository using the included vogon.wiki.lua file. From a Lua description file, multiple pages are created<br />
which can then be relatively easily copied and pasted into new pages. Run create-wiki-pages.lua without<br />
arguments for instructions.<br/><br />
<br/><br />
An example of a new paragraph.<br />
</translate><br/><br />
=== <translate>Example</translate> ===<br />
<br />
'''Standard use of a Vogon.'''<br/><br />
<source lang="lua">require "Vogon"<br />
local vogon = Vogon.new()<br />
local poetry = vogon:writePoetry(topic)<br />
local number_of_deaths = vogon:recitePoetry()<br />
</source><br />
<br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/Vogon.new|Vogon.new]] ''<translate>Create a new Vogon</translate>''<br/><!-- GIDEROSMTD:Vogon.new() Create a new Vogon --><br />
[[Special:MyLanguage/Vogon:writePoetry|Vogon:writePoetry]] ''<translate>Creates abnormally long poem.</translate>''<br/><!-- GIDEROSMTD:Vogon:writePoetry(topic) Creates abnormally long poem. --><br />
[[Special:MyLanguage/Vogon:recitePoetry|Vogon:recitePoetry]] ''<translate>Recites the third worst poetry in the known universe.</translate>''<br/><!-- GIDEROSMTD:Vogon:recitePoetry() Recites the third worst poetry in the known universe. --><br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Events</translate> ===<br />
[[Special:MyLanguage/Vogon.DESTRUCTION_IMMINENT|Vogon.DESTRUCTION_IMMINENT]]<br/><br />
[[Special:MyLanguage/Vogon.DESTRUCTION_COMPLETE|Vogon.DESTRUCTION_COMPLETE]]<br/><br />
=== <translate>Constants</translate> ===<br />
[[Special:MyLanguage/Vogon.STATUS_SIGN_POSTED|Vogon.STATUS_SIGN_POSTED]]<br/><br />
[[Special:MyLanguage/Vogon.STATUS_DESTRUCTION_APPROVED|Vogon.STATUS_DESTRUCTION_APPROVED]]<br/><br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=Vogons&diff=12792Vogons2018-10-06T21:32:11Z<p>PaulR: Created page with "__NOTOC__ <languages /> <!-- GIDEROSOBJ:Vogons --> '''<translate>Supported platforms</translate>:''' File:Platform android.pngFile:Platform ios.pngFile:Platform pc.p..."</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:Vogons --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform pc.png]][[File:Platform mac.png]][[File:Platform winrt.png]][[File:Platform win32.png]][[File:Platform html5.png]]<br/><br />
'''<translate>Available since</translate>:''' 2042.11<br/><br />
=== <translate>Description</translate> ===<br />
<translate>This is just a test of docs gen from the create-wiki-pages.lua script in the plugins folder of the Gideros<br />
repository using the included vogon.wiki.lua file. From a Lua description file, multiple pages are created<br />
which can then be relatively easily copied and pasted into new pages. Run create-wiki-pages.lua without<br />
arguments for instructions.<br/><br />
<br/><br />
An example of a new paragraph.<br />
</translate><br/><br />
=== <translate>Class</translate> ===<br />
[[Special:MyLanguage/Vogon|Vogon]]<br/></div>PaulRhttps://wiki.gideros.rocks/index.php?title=Compiling_Gideros_Source&diff=12784Compiling Gideros Source2018-10-05T21:19:29Z<p>PaulR: /* 1.12.2 Configure scripts */</p>
<hr />
<div>The following instructions are for developers who want to contribute to or otherwise experiment with the Gideros C/C++ engine and are ''not'' necessary for either building or deploying apps made with Gideros.<br />
<br />
The Gideros project consists of the Gideros Studio IDE, the Gideros SDK libraries, Gideros Texture Packer, Gideros Font Creator, "players" or export templates for all the platforms Gideros supports, all targets of all plugins, a daemon and a bridge. The build system is flexible, so you only need the tools for the targets you are interested in deploying to with Qt (and MSYS2 on Windows) being a realistic minimum.<br />
<br />
<div class="noautonum">__TOC__</div><br />
<br />
== 1. Requirements ==<br />
=== 1.1 Install QT ===<br />
https://www.qt.io/download-open-source/<br />
<br />
Recommended version 5.10.1 with MinGW 5.3<br /><br />
Windows: https://download.qt.io/archive/qt/5.10/5.10.1/qt-opensource-windows-x86-5.10.1.exe<br /><br />
Mac OSX: https://download.qt.io/archive/qt/5.10/5.10.1/qt-opensource-mac-x64-5.10.1.dmg<br /><br />
Linux: https://download.qt.io/archive/qt/5.10/5.10.1/qt-opensource-linux-x64-5.10.1.run<br />
<br />
Double click on the downloaded file and follow instructions. When installing, change the install directory to /Qt rather than /Qt/Qt5.10.1, expand the tree view and ensure you have ticked the MinGW child option of the Qt version checkbox, as well as the MinGW option in the Tools section.<br />
<br />
(MAC) Move the created folder into your user account folder <br />
<br />
------<br />
<br />
===1.2 (PC) Install MSYS2 Console===<br />
https://msys2.github.io/ <br />
<br />
Double click on the downloaded file (msys2-i686) and follow instructions. <br />
<br />
Open 32 bit MSYS2 shell: msys2_shell.cmd<br />
<source lang="bash"><br />
pacman –Sy pacman<br />
pacman –Syu<br />
pacman –Su<br />
pacman –S tar<br />
pacman –S zip<br />
pacman –S git<br />
pacman –S base-devel<br />
pacman -S python<br />
</source><br />
------<br />
<br />
=== 1.3 (Mac) Install Git ===<br />
http://git-scm.com/downloads<br />
<br />
Ctrl + right click, open with « Install program.app » Follow instructions keeping default values as they are. <br />
<br />
(MAC) open a terminal window <br />
<source lang="bash"><br />
git config –global user.name "your git login" <br />
git config –global user.email "your git email"<br />
</source><br />
------<br />
<br />
=== 1.4 (PC) Android requirements ===<br />
<br />
==== 1.4.1 Install Android Studio and NDK ====<br />
<br />
https://developer.android.com/studio/index.html<br />
https://developer.android.com/ndk/downloads/older_releases.html<br />
<br />
Recommended NDK is 17 (the x86_64 version)<br />
<br />
Once downloaded, copy the contents of the NDK to your home or C: folder, rename the folder that you copied to 'android-ndk', for example you will end up with 'c:\android-ndk' and below that folders that say build, meta, platforms, etc.<br />
<br />
==== 1.4.2 Install Ant ====<br />
https://ant.apache.org/<br />
<br />
Once downloaded, copy the contents of the install archive/zip file to your home folder or C: drive.<br />
Eg: so you have a folder called c:\apache-ant-1.10.5 with bin, etc, lib, manual folders within that.<br />
<br />
==== 1.4.3 Mix Old and New Tools ====<br />
<br />
Gideros uses Ant to build the player, unfortunately the tools to support Ant are now missing from the latest Android tools.<br />
<br />
<br />
There is a fix for this:<br />
<br />
# Rename the existing 'tools' folder in the Android SDK folder to 'tools_new'.<br />
# Download an older (March 2016) version of the tools and copy that folder to the Android SDK folder.<br />
# Copy the contents of 'tools_new' over the contents of 'tools'.<br />
<br />
Here is where you can download the compatible set of tools from:<br />
<br />
(PC) https://dl.google.com/android/repository/tools_r25.2.5-windows.zip<br />
<br />
(MAC) https://dl.google.com/android/repository/tools_r25.2.5-macosx.zip<br />
<br />
(LINUX) https://dl.google.com/android/repository/tools_r25.2.5-linux.zip<br />
<br />
------<br />
<br />
=== 1.5 Install Java ===<br />
You need the Java JDK<br />
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html<br />
<br />
------<br />
<br />
=== 1.6 (PC) Install Visual Studio ===<br />
https://www.visualstudio.com/downloads/<br />
<br />
Install [https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk Win 8.1 SDK]<br />
<br />
Install [https://marketplace.visualstudio.com/items?itemName=AdMediator.MicrosoftAdvertisingSDKforWindowsandWindowsPhone8x Microsoft Advertising SDK for Windows and Windows Phone 8.x]<br />
<br />
Ensure that you have MSBuild v12 or v14 installed (building with the makefile will fail with an incorrect version).<br />
<br />
------<br />
<br />
=== 1.7 (MAC) Install Xcode ===<br />
https://itunes.apple.com/fr/app/xcode/id497799835?mt=12<br />
<br />
------<br />
<br />
=== 1.8 Install QScintilla ===<br />
https://www.riverbankcomputing.com/software/qscintilla/download <br /><br />
Double click on the downloaded file and follow instructions.<br />
<br />
Recommended 2.10.8<br /><br />
Windows: https://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-2.10.8/QScintilla_gpl-2.10.8.zip<br /><br />
Mac OSX/Linux: https://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-2.10.8/QScintilla_gpl-2.10.8.tar.gz<br />
<br />
(PC) Unzip the file into the folder of your choice. <br />
<br />
(MAC) Move the created folder into the Applications subfolder of your home directory. <br />
<br />
(MAC) Open a terminal window <br />
<br />
(MAC) On the first install:<br />
<br />
<source lang="bash"><br />
sudo xCodebuild –license <br />
quit<br />
agree<br />
</source><br />
<br /><br />
''' With the command line, go to Q4Qt5 subfolder of QScintilla : '''<br />
<br />
On PC :<br />
<br />
Open Qt command prompt (called (eg) Qt 5.9.1 for Desktop). This command prompt just sets environment variables, allowing direct running of tools installed with Qt.<br />
<br />
Navigate to QScintilla's Qt4Qt5 subfolder with ‘cd’ command, then type :<br />
<br /><br />
<source lang="bash"><br />
qmake qscintilla.pro <br />
mingw32-make <br />
mingw32-make install <br />
</source><br />
<br /><br />
On Mac:<br />
Assuming X.x is your QT version, do the following : <br />
<br />
<source lang="bash"><br />
~/Qt/X.x/clang_64/bin/qmake qscintilla.pro <br />
make <br />
make install <br />
</source><br />
<br /><br />
On Linux:<br />
Locate qmake in your Qt installation, usually /opt/Qt/<version>/gcc_64/bin/qmake and run:<br />
<source lang="bash"><br />
/path/to/qmake qscintilla.pro <br />
make <br />
make install <br />
</source><br />
<br /><br />
For the debug build necessary for debugging Gideros Studio run:<br />
<source lang="bash"><br />
make -f Makefile.Debug # mingw32-make on Windows<br />
make -f Makefile.Debug install # mingw32-make on Windows<br />
</source><br />
<br />
<br />
------<br />
<br />
=== 1.9 Install Python ===<br />
https://www.python.org/downloads/release/python-2712/<br />
<br />
You need Python 2.7.12 or later to install emscripten properly.<br />
<br />
Once installed, add it to your command line path, eg: c:\python27, on windows you can do this by right-clicking on 'myComputer' or 'This PC', go to 'Properties', click 'Advanced System Settings', Click 'Environmental Variables', double-click 'Path', add 'c:\python27'.<br />
<br />
------<br />
<br />
=== 1.10 Install emscripten ===<br />
http://kripken.github.io/emscripten-site/<br />
<br />
You need this is you want to build for HTML5 + Facebook games.<br />
<br />
Using a shell or MSYS2 (previously installed) on windows, go to your home or C: folder and type:<br />
<source lang="bash"><br />
git clone https://github.com/juj/emsdk.git<br />
</source><br />
<br />
Once that has completed open a command prompt in that folder on Windows, on other system just cd to the folder.<br />
<br />
Using emsdk, install packages sdk, clang, node, python and emscripten.<br />
<br />
<source lang="bash"><br />
(on non-PC put ./ before emsdk)<br />
emsdk install latest<br />
emsdk activate latest<br />
</source><br />
<br />
(PC) Type:<br />
<source lang="bash"><br />
emsdk_env.bat<br />
</source><br />
<br />
(MAC) Type:<br />
<source lang="bash"><br />
source ./emsdk_env.sh<br />
</source><br />
<br />
These can also be installed within emsdk: git, crunch, and spidermonkey<br />
<source lang="bash"><br />
(on non-PC put ./ before emsdk)<br />
emsdk install git-1.9.4<br />
emsdk install crunch-1.03<br />
emsdk install spidermonkey-37.0.1-64bit<br />
emsdk activate git-1.9.4<br />
emsdk activate crunch-1.03<br />
emsdk activate spidermonkey-37.0.1-64bit<br />
(PC) emsdk_env.bat<br />
(MAC) source ./emsdk_env.sh<br />
</source><br />
<br />
(PC) Make sure the environment variable EM_CONFIG is set to the location of your emscripten config file.<br />
<br />
------<br />
<br />
=== 1.11 Install Steam SDK ===<br />
https://partner.steamgames.com/?goto=%2Fdownloads%2Fsteamworks_sdk.zip<br />
<br />
Extract the archive/zip file to your home or C: folder, for example if the file is called 'steamworks_sdk_142.zip' then you will have a 'c:\steamworks_sdk_142' folder with a solder called 'sdk' within it. The sdk folder contains other folders such as glmgr, public, tools, etc.<br />
<br />
This is necessary for the Steam plugin.<br />
<br />
------<br />
<br />
=== 1.12 Install Gideros ===<br />
<br />
==== 1.12.1 Fetch gideros source code ====<br />
(PC) Open MSYS2 32 bit shell<br />
<br />
(MAC/Linux) Open a terminal<br />
<br />
Navigate to the folder where you into to work.<br />
<br />
<source lang="bash"><br />
git clone https://github.com/gideros/gideros <br />
</source><br />
<br />
==== 1.12.2 Configure scripts ====<br />
Make a copy of the file gideros/scripts/Makefile.def.example, rename it to Makefile.def and update the file copy according <br />
to your installation. Ensure that the QT\_ARCH and QT_TOOLSARCH paths are formatted correctly according to your Qt <br />
install directory structure (see below that they are named differently by Qt).<br />
<br />
''''''Example:''''''<br />
<br/><br />
'''On PC:'''<br />
<br />
For Qt:<source lang="bash>QTBASEDIR=/c/Qt<br />
QT_ARCH=mingw53_32<br />
QT_TOOLSARCH=mingw530_32<br />
QTVER=5.9.1<br />
QT5ICUVER=59<br />
<br />
STEAMSDK=/c/Applications/steamworks_sdk_142<br />
export STEAMSDK<br />
</source><br />
<br/><br />
For Android:<br />
<br />
<source lang="bash"><br />
# on Windows, also add this to PATH<br />
NDK_HOME=/c/android/android-ndk-r17b<br />
<br />
NDKBUILD=cmd //c /c/android/android-ndk-r17b/ndk-build.cmd<br />
<br />
# remember to escape disallowed characters, or wrap in quotes<br />
JAVA_HOME=/c/Program\ Files\ \(x86\)/Java/jdk1.8.0_144<br />
ANT_HOME=/c/apache-ant-1.10.1<br />
ANDROID_HOME=C:/SDKs/Android/Sdk <br />
</source><br />
<br/><br />
For WinRT:<br />
<br />
<source lang="bash"><br />
FXC="/c/Program Files (x86)/Windows Kits/8.1/bin/x86/fxc.exe" <br />
MSBUILD="/c/Program Files (x86)/MSBuild/14.0/Bin/MSbuild.exe" <br />
</source><br />
<br/><br />
<br />
For html5:<br />
<br />
<source lang="bash"><br />
EMSDK=/c/emsdkwin<br />
EMSDKPATH=$(EMSDK):$(EMSDK)/clang/e1.35.0_64bit:$(EMSDK)/node/4.1.1_64bit/bin:$(EMSDK)/python/2.7.5.3_64bit:$(EMSDK)/emscripten/1.35.0<br />
EMSDK_PREFIX=PATH=$(EMSDKPATH):$$$$PATH cmd //c<br />
CRUNCHME=crunchme-win32.exe<br />
</source><br />
<br/><br />
'''On MAC:''' <br />
<br />
<source lang="bash"><br />
QTBASEDIR=~/Qt QT_ARCH=clang_64 <br />
QT_TOOLSARCH=clang_64 <br />
QTVER=5.8 <br />
QT5ICUVER=54 #deprecated stuff <br />
</source><br />
<br />
<br />
Here is another [[Example Makefile.def file|example Makefile.def file]].<br />
<br />
==== 1.12.3 Fetch additional repositories ====<br />
Go into just cloned gideros source folder and run make prep.repo<br />
<source lang="bash"><br />
cd gideros<br />
make -f scripts/Makefile.gid prep.repo <br />
</source><br />
<br />
------<br />
<br />
== 2. Building ==<br />
<br />
If you have all dependencies in place for all targets, you can build everything at once via MSYS2 or Terminal with:<br />
<br />
<pre lang="bash"><br />
make -f scripts/Makefile.gid<br />
</pre><br />
<br />
=== 2.1 Compilation on PC :===<br />
<br />
Open MSYS2 shell (msys2_shell.cmd). Standard compilation is 32 bit so use a 32 bit shell. Make sure you have installed the necessary build tools in MSYS2 using pacman, as detailed in [[#1.2 (PC) Install MSYS2 Console|Install MSYS2 Console]].<br />
.<br />
<br />
Navigate to gideros folder <br />
<br />
==== 2.1.1 Build QT tools : ====<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid qtapp.install<br />
</pre><br />
<br />
-> files GiderosStudio.exe, GiderosPlayer.exe, GiderosTexturePacker.exe (…) in Build.Win folder <br />
<br />
==== 2.1.2 Android: ====<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid android.install <br />
</pre><br />
<br />
= file GiderosAndroidPlayer.apk in folder Build.Win/Players <br />
<br />
==== 2.1.3 winRT: ====<br />
<br />
''If necessary :''<br />
Open the solution, gideros/winRT_example/giderosgame.sln in Visual Studio. Check that the SQLite version for Windows and Windows Phone is up to date. Save and close the solution. <br />
<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid winrt.install <br />
</pre><br />
<br />
= file _bundle.appxupload in folder Build.Win/Players/WinRT<br />
<br />
==== 2.1.4 win32: ====<br />
<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid win32.install <br />
</pre><br />
<br />
= files in folder Build.Win/Templates/win32 <br />
<br />
==== 2.1.5 Html5: ====<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid html5.install<br />
</pre><br />
<br />
-> files in folders Build.Win//Players/Html5 and Build.Win/Templates/Html5<br />
<br />
==== 2.1.6 Plugins: ====<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid bundle.win <br />
</pre><br />
<br />
= folder bin and file gplugin in folder Build.Win/All Plugins<br />
<br />
==== 2.1.7 To build everything that can be built on Windows ====<br />
<source lang="bash"><br />
make -f scripts/Makefile.gid all<br />
</source><br />
<br />
<br />
=== 2.2 Compilation on Mac :===<br />
Open Terminal. <br />
<br />
cd to the folder « gideros » <br />
<br />
==== 2.2.1 QT : ====<br />
<pre lang="bash"><br />
make -f scripts/Makefile.gid qtapp.install <br />
</pre><br />
<br />
= GiderosStudio.exe, GiderosPlayer.exe, GiderosTexturePacker.exe (…) in folder Build.Mac <br />
<br />
==== 2.2.2 iOS : ====<br />
<pre lang="bash"><br />
make -f scripts/Makefile.gid ios.install <br />
</pre><br />
<br />
= GiderosiOSPlayer.zip in folder Buid.Mac/Players <br />
<br />
==== 2.2.3 Plugins: ====<br />
<pre lang="bash"><br />
make -f scripts/Makefile.gid bundle.mac <br />
</pre><br />
<br />
= folders bin and files gplugin in folder Buid.Mac/All Plugins</div>PaulRhttps://wiki.gideros.rocks/index.php?title=Compiling_Gideros_Source&diff=12783Compiling Gideros Source2018-10-05T21:18:53Z<p>PaulR: /* 1.12.2 Configure scripts */</p>
<hr />
<div>The following instructions are for developers who want to contribute to or otherwise experiment with the Gideros C/C++ engine and are ''not'' necessary for either building or deploying apps made with Gideros.<br />
<br />
The Gideros project consists of the Gideros Studio IDE, the Gideros SDK libraries, Gideros Texture Packer, Gideros Font Creator, "players" or export templates for all the platforms Gideros supports, all targets of all plugins, a daemon and a bridge. The build system is flexible, so you only need the tools for the targets you are interested in deploying to with Qt (and MSYS2 on Windows) being a realistic minimum.<br />
<br />
<div class="noautonum">__TOC__</div><br />
<br />
== 1. Requirements ==<br />
=== 1.1 Install QT ===<br />
https://www.qt.io/download-open-source/<br />
<br />
Recommended version 5.10.1 with MinGW 5.3<br /><br />
Windows: https://download.qt.io/archive/qt/5.10/5.10.1/qt-opensource-windows-x86-5.10.1.exe<br /><br />
Mac OSX: https://download.qt.io/archive/qt/5.10/5.10.1/qt-opensource-mac-x64-5.10.1.dmg<br /><br />
Linux: https://download.qt.io/archive/qt/5.10/5.10.1/qt-opensource-linux-x64-5.10.1.run<br />
<br />
Double click on the downloaded file and follow instructions. When installing, change the install directory to /Qt rather than /Qt/Qt5.10.1, expand the tree view and ensure you have ticked the MinGW child option of the Qt version checkbox, as well as the MinGW option in the Tools section.<br />
<br />
(MAC) Move the created folder into your user account folder <br />
<br />
------<br />
<br />
===1.2 (PC) Install MSYS2 Console===<br />
https://msys2.github.io/ <br />
<br />
Double click on the downloaded file (msys2-i686) and follow instructions. <br />
<br />
Open 32 bit MSYS2 shell: msys2_shell.cmd<br />
<source lang="bash"><br />
pacman –Sy pacman<br />
pacman –Syu<br />
pacman –Su<br />
pacman –S tar<br />
pacman –S zip<br />
pacman –S git<br />
pacman –S base-devel<br />
pacman -S python<br />
</source><br />
------<br />
<br />
=== 1.3 (Mac) Install Git ===<br />
http://git-scm.com/downloads<br />
<br />
Ctrl + right click, open with « Install program.app » Follow instructions keeping default values as they are. <br />
<br />
(MAC) open a terminal window <br />
<source lang="bash"><br />
git config –global user.name "your git login" <br />
git config –global user.email "your git email"<br />
</source><br />
------<br />
<br />
=== 1.4 (PC) Android requirements ===<br />
<br />
==== 1.4.1 Install Android Studio and NDK ====<br />
<br />
https://developer.android.com/studio/index.html<br />
https://developer.android.com/ndk/downloads/older_releases.html<br />
<br />
Recommended NDK is 17 (the x86_64 version)<br />
<br />
Once downloaded, copy the contents of the NDK to your home or C: folder, rename the folder that you copied to 'android-ndk', for example you will end up with 'c:\android-ndk' and below that folders that say build, meta, platforms, etc.<br />
<br />
==== 1.4.2 Install Ant ====<br />
https://ant.apache.org/<br />
<br />
Once downloaded, copy the contents of the install archive/zip file to your home folder or C: drive.<br />
Eg: so you have a folder called c:\apache-ant-1.10.5 with bin, etc, lib, manual folders within that.<br />
<br />
==== 1.4.3 Mix Old and New Tools ====<br />
<br />
Gideros uses Ant to build the player, unfortunately the tools to support Ant are now missing from the latest Android tools.<br />
<br />
<br />
There is a fix for this:<br />
<br />
# Rename the existing 'tools' folder in the Android SDK folder to 'tools_new'.<br />
# Download an older (March 2016) version of the tools and copy that folder to the Android SDK folder.<br />
# Copy the contents of 'tools_new' over the contents of 'tools'.<br />
<br />
Here is where you can download the compatible set of tools from:<br />
<br />
(PC) https://dl.google.com/android/repository/tools_r25.2.5-windows.zip<br />
<br />
(MAC) https://dl.google.com/android/repository/tools_r25.2.5-macosx.zip<br />
<br />
(LINUX) https://dl.google.com/android/repository/tools_r25.2.5-linux.zip<br />
<br />
------<br />
<br />
=== 1.5 Install Java ===<br />
You need the Java JDK<br />
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html<br />
<br />
------<br />
<br />
=== 1.6 (PC) Install Visual Studio ===<br />
https://www.visualstudio.com/downloads/<br />
<br />
Install [https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk Win 8.1 SDK]<br />
<br />
Install [https://marketplace.visualstudio.com/items?itemName=AdMediator.MicrosoftAdvertisingSDKforWindowsandWindowsPhone8x Microsoft Advertising SDK for Windows and Windows Phone 8.x]<br />
<br />
Ensure that you have MSBuild v12 or v14 installed (building with the makefile will fail with an incorrect version).<br />
<br />
------<br />
<br />
=== 1.7 (MAC) Install Xcode ===<br />
https://itunes.apple.com/fr/app/xcode/id497799835?mt=12<br />
<br />
------<br />
<br />
=== 1.8 Install QScintilla ===<br />
https://www.riverbankcomputing.com/software/qscintilla/download <br /><br />
Double click on the downloaded file and follow instructions.<br />
<br />
Recommended 2.10.8<br /><br />
Windows: https://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-2.10.8/QScintilla_gpl-2.10.8.zip<br /><br />
Mac OSX/Linux: https://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-2.10.8/QScintilla_gpl-2.10.8.tar.gz<br />
<br />
(PC) Unzip the file into the folder of your choice. <br />
<br />
(MAC) Move the created folder into the Applications subfolder of your home directory. <br />
<br />
(MAC) Open a terminal window <br />
<br />
(MAC) On the first install:<br />
<br />
<source lang="bash"><br />
sudo xCodebuild –license <br />
quit<br />
agree<br />
</source><br />
<br /><br />
''' With the command line, go to Q4Qt5 subfolder of QScintilla : '''<br />
<br />
On PC :<br />
<br />
Open Qt command prompt (called (eg) Qt 5.9.1 for Desktop). This command prompt just sets environment variables, allowing direct running of tools installed with Qt.<br />
<br />
Navigate to QScintilla's Qt4Qt5 subfolder with ‘cd’ command, then type :<br />
<br /><br />
<source lang="bash"><br />
qmake qscintilla.pro <br />
mingw32-make <br />
mingw32-make install <br />
</source><br />
<br /><br />
On Mac:<br />
Assuming X.x is your QT version, do the following : <br />
<br />
<source lang="bash"><br />
~/Qt/X.x/clang_64/bin/qmake qscintilla.pro <br />
make <br />
make install <br />
</source><br />
<br /><br />
On Linux:<br />
Locate qmake in your Qt installation, usually /opt/Qt/<version>/gcc_64/bin/qmake and run:<br />
<source lang="bash"><br />
/path/to/qmake qscintilla.pro <br />
make <br />
make install <br />
</source><br />
<br /><br />
For the debug build necessary for debugging Gideros Studio run:<br />
<source lang="bash"><br />
make -f Makefile.Debug # mingw32-make on Windows<br />
make -f Makefile.Debug install # mingw32-make on Windows<br />
</source><br />
<br />
<br />
------<br />
<br />
=== 1.9 Install Python ===<br />
https://www.python.org/downloads/release/python-2712/<br />
<br />
You need Python 2.7.12 or later to install emscripten properly.<br />
<br />
Once installed, add it to your command line path, eg: c:\python27, on windows you can do this by right-clicking on 'myComputer' or 'This PC', go to 'Properties', click 'Advanced System Settings', Click 'Environmental Variables', double-click 'Path', add 'c:\python27'.<br />
<br />
------<br />
<br />
=== 1.10 Install emscripten ===<br />
http://kripken.github.io/emscripten-site/<br />
<br />
You need this is you want to build for HTML5 + Facebook games.<br />
<br />
Using a shell or MSYS2 (previously installed) on windows, go to your home or C: folder and type:<br />
<source lang="bash"><br />
git clone https://github.com/juj/emsdk.git<br />
</source><br />
<br />
Once that has completed open a command prompt in that folder on Windows, on other system just cd to the folder.<br />
<br />
Using emsdk, install packages sdk, clang, node, python and emscripten.<br />
<br />
<source lang="bash"><br />
(on non-PC put ./ before emsdk)<br />
emsdk install latest<br />
emsdk activate latest<br />
</source><br />
<br />
(PC) Type:<br />
<source lang="bash"><br />
emsdk_env.bat<br />
</source><br />
<br />
(MAC) Type:<br />
<source lang="bash"><br />
source ./emsdk_env.sh<br />
</source><br />
<br />
These can also be installed within emsdk: git, crunch, and spidermonkey<br />
<source lang="bash"><br />
(on non-PC put ./ before emsdk)<br />
emsdk install git-1.9.4<br />
emsdk install crunch-1.03<br />
emsdk install spidermonkey-37.0.1-64bit<br />
emsdk activate git-1.9.4<br />
emsdk activate crunch-1.03<br />
emsdk activate spidermonkey-37.0.1-64bit<br />
(PC) emsdk_env.bat<br />
(MAC) source ./emsdk_env.sh<br />
</source><br />
<br />
(PC) Make sure the environment variable EM_CONFIG is set to the location of your emscripten config file.<br />
<br />
------<br />
<br />
=== 1.11 Install Steam SDK ===<br />
https://partner.steamgames.com/?goto=%2Fdownloads%2Fsteamworks_sdk.zip<br />
<br />
Extract the archive/zip file to your home or C: folder, for example if the file is called 'steamworks_sdk_142.zip' then you will have a 'c:\steamworks_sdk_142' folder with a solder called 'sdk' within it. The sdk folder contains other folders such as glmgr, public, tools, etc.<br />
<br />
This is necessary for the Steam plugin.<br />
<br />
------<br />
<br />
=== 1.12 Install Gideros ===<br />
<br />
==== 1.12.1 Fetch gideros source code ====<br />
(PC) Open MSYS2 32 bit shell<br />
<br />
(MAC/Linux) Open a terminal<br />
<br />
Navigate to the folder where you into to work.<br />
<br />
<source lang="bash"><br />
git clone https://github.com/gideros/gideros <br />
</source><br />
<br />
==== 1.12.2 Configure scripts ====<br />
Make a copy of the file gideros/scripts/Makefile.def.example, rename it to Makefile.def and update the file copy according <br />
to your installation. Ensure that the QT\_ARCH and QT_TOOLSARCH paths are formatted correctly according to your Qt <br />
install directory structure (see below that they are named differently by Qt).<br />
<br />
''''''Example:''''''<br />
<br/><br />
'''On PC:'''<br />
<br />
For Qt:<source lang="bash>QTBASEDIR=/c/Qt<br />
QT_ARCH=mingw53_32<br />
QT_TOOLSARCH=mingw530_32<br />
QTVER=5.9.1<br />
QT5ICUVER=59<br />
<br />
STEAMSDK=/c/Applications/steamworks_sdk_142<br />
export STEAMSDK<br />
</source><br />
<br/><br />
For Android:<br />
<br />
<source lang="bash"><br />
# on Windows, also add this to PATH<br />
NDK_HOME=/c/android/android-ndk-r17b<br />
<br />
NDKBUILD=cmd //c /c/android/android-ndk-r17b/ndk-build.cmd<br />
<br />
# remember to escape disallowed characters, or wrap in quotes<br />
JAVA_HOME=/c/Program\ Files\ \(x86\)/Java/jdk1.8.0_144<br />
ANT_HOME=/c/apache-ant-1.10.1<br />
ANDROID_HOME=C:/SDKs/Android/Sdk <br />
</source><br />
<br/><br />
For WinRT:<br />
<br />
<source lang="bash"><br />
FXC="/c/Program Files (x86)/Windows Kits/8.1/bin/x86/fxc.exe" <br />
MSBUILD="/c/Program Files (x86)/MSBuild/14.0/Bin/MSbuild.exe" <br />
</source><br />
<br/><br />
<br />
For html5:<br />
<br />
<source lang="bash"><br />
EMSDK=/c/emsdkwin<br />
EMSDKPATH=$(EMSDK):$(EMSDK)/clang/e1.35.0_64bit:$(EMSDK)/node/4.1.1_64bit/bin:$(EMSDK)/python/2.7.5.3_64bit:$(EMSDK)/emscripten/1.35.0<br />
EMSDK_PREFIX=PATH=$(EMSDKPATH):$$$$PATH cmd //c<br />
CRUNCHME=crunchme-win32.exe<br />
</source><br />
<br/><br />
For html5:<br />
<br />
<source lang="bash"><br />
STEAMSDK=/c/steam-sdk<br />
export STEAMSDK<br />
</source><br />
<br/><br />
'''On MAC:''' <br />
<br />
<source lang="bash"><br />
QTBASEDIR=~/Qt QT_ARCH=clang_64 <br />
QT_TOOLSARCH=clang_64 <br />
QTVER=5.8 <br />
QT5ICUVER=54 #deprecated stuff <br />
</source><br />
<br />
<br />
Here is another [[Example Makefile.def file|example Makefile.def file]].<br />
<br />
==== 1.12.3 Fetch additional repositories ====<br />
Go into just cloned gideros source folder and run make prep.repo<br />
<source lang="bash"><br />
cd gideros<br />
make -f scripts/Makefile.gid prep.repo <br />
</source><br />
<br />
------<br />
<br />
== 2. Building ==<br />
<br />
If you have all dependencies in place for all targets, you can build everything at once via MSYS2 or Terminal with:<br />
<br />
<pre lang="bash"><br />
make -f scripts/Makefile.gid<br />
</pre><br />
<br />
=== 2.1 Compilation on PC :===<br />
<br />
Open MSYS2 shell (msys2_shell.cmd). Standard compilation is 32 bit so use a 32 bit shell. Make sure you have installed the necessary build tools in MSYS2 using pacman, as detailed in [[#1.2 (PC) Install MSYS2 Console|Install MSYS2 Console]].<br />
.<br />
<br />
Navigate to gideros folder <br />
<br />
==== 2.1.1 Build QT tools : ====<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid qtapp.install<br />
</pre><br />
<br />
-> files GiderosStudio.exe, GiderosPlayer.exe, GiderosTexturePacker.exe (…) in Build.Win folder <br />
<br />
==== 2.1.2 Android: ====<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid android.install <br />
</pre><br />
<br />
= file GiderosAndroidPlayer.apk in folder Build.Win/Players <br />
<br />
==== 2.1.3 winRT: ====<br />
<br />
''If necessary :''<br />
Open the solution, gideros/winRT_example/giderosgame.sln in Visual Studio. Check that the SQLite version for Windows and Windows Phone is up to date. Save and close the solution. <br />
<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid winrt.install <br />
</pre><br />
<br />
= file _bundle.appxupload in folder Build.Win/Players/WinRT<br />
<br />
==== 2.1.4 win32: ====<br />
<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid win32.install <br />
</pre><br />
<br />
= files in folder Build.Win/Templates/win32 <br />
<br />
==== 2.1.5 Html5: ====<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid html5.install<br />
</pre><br />
<br />
-> files in folders Build.Win//Players/Html5 and Build.Win/Templates/Html5<br />
<br />
==== 2.1.6 Plugins: ====<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid bundle.win <br />
</pre><br />
<br />
= folder bin and file gplugin in folder Build.Win/All Plugins<br />
<br />
==== 2.1.7 To build everything that can be built on Windows ====<br />
<source lang="bash"><br />
make -f scripts/Makefile.gid all<br />
</source><br />
<br />
<br />
=== 2.2 Compilation on Mac :===<br />
Open Terminal. <br />
<br />
cd to the folder « gideros » <br />
<br />
==== 2.2.1 QT : ====<br />
<pre lang="bash"><br />
make -f scripts/Makefile.gid qtapp.install <br />
</pre><br />
<br />
= GiderosStudio.exe, GiderosPlayer.exe, GiderosTexturePacker.exe (…) in folder Build.Mac <br />
<br />
==== 2.2.2 iOS : ====<br />
<pre lang="bash"><br />
make -f scripts/Makefile.gid ios.install <br />
</pre><br />
<br />
= GiderosiOSPlayer.zip in folder Buid.Mac/Players <br />
<br />
==== 2.2.3 Plugins: ====<br />
<pre lang="bash"><br />
make -f scripts/Makefile.gid bundle.mac <br />
</pre><br />
<br />
= folders bin and files gplugin in folder Buid.Mac/All Plugins</div>PaulRhttps://wiki.gideros.rocks/index.php?title=Compiling_Gideros_Source&diff=12782Compiling Gideros Source2018-10-05T21:16:50Z<p>PaulR: /* 1.11 Install Steam SDK */</p>
<hr />
<div>The following instructions are for developers who want to contribute to or otherwise experiment with the Gideros C/C++ engine and are ''not'' necessary for either building or deploying apps made with Gideros.<br />
<br />
The Gideros project consists of the Gideros Studio IDE, the Gideros SDK libraries, Gideros Texture Packer, Gideros Font Creator, "players" or export templates for all the platforms Gideros supports, all targets of all plugins, a daemon and a bridge. The build system is flexible, so you only need the tools for the targets you are interested in deploying to with Qt (and MSYS2 on Windows) being a realistic minimum.<br />
<br />
<div class="noautonum">__TOC__</div><br />
<br />
== 1. Requirements ==<br />
=== 1.1 Install QT ===<br />
https://www.qt.io/download-open-source/<br />
<br />
Recommended version 5.10.1 with MinGW 5.3<br /><br />
Windows: https://download.qt.io/archive/qt/5.10/5.10.1/qt-opensource-windows-x86-5.10.1.exe<br /><br />
Mac OSX: https://download.qt.io/archive/qt/5.10/5.10.1/qt-opensource-mac-x64-5.10.1.dmg<br /><br />
Linux: https://download.qt.io/archive/qt/5.10/5.10.1/qt-opensource-linux-x64-5.10.1.run<br />
<br />
Double click on the downloaded file and follow instructions. When installing, change the install directory to /Qt rather than /Qt/Qt5.10.1, expand the tree view and ensure you have ticked the MinGW child option of the Qt version checkbox, as well as the MinGW option in the Tools section.<br />
<br />
(MAC) Move the created folder into your user account folder <br />
<br />
------<br />
<br />
===1.2 (PC) Install MSYS2 Console===<br />
https://msys2.github.io/ <br />
<br />
Double click on the downloaded file (msys2-i686) and follow instructions. <br />
<br />
Open 32 bit MSYS2 shell: msys2_shell.cmd<br />
<source lang="bash"><br />
pacman –Sy pacman<br />
pacman –Syu<br />
pacman –Su<br />
pacman –S tar<br />
pacman –S zip<br />
pacman –S git<br />
pacman –S base-devel<br />
pacman -S python<br />
</source><br />
------<br />
<br />
=== 1.3 (Mac) Install Git ===<br />
http://git-scm.com/downloads<br />
<br />
Ctrl + right click, open with « Install program.app » Follow instructions keeping default values as they are. <br />
<br />
(MAC) open a terminal window <br />
<source lang="bash"><br />
git config –global user.name "your git login" <br />
git config –global user.email "your git email"<br />
</source><br />
------<br />
<br />
=== 1.4 (PC) Android requirements ===<br />
<br />
==== 1.4.1 Install Android Studio and NDK ====<br />
<br />
https://developer.android.com/studio/index.html<br />
https://developer.android.com/ndk/downloads/older_releases.html<br />
<br />
Recommended NDK is 17 (the x86_64 version)<br />
<br />
Once downloaded, copy the contents of the NDK to your home or C: folder, rename the folder that you copied to 'android-ndk', for example you will end up with 'c:\android-ndk' and below that folders that say build, meta, platforms, etc.<br />
<br />
==== 1.4.2 Install Ant ====<br />
https://ant.apache.org/<br />
<br />
Once downloaded, copy the contents of the install archive/zip file to your home folder or C: drive.<br />
Eg: so you have a folder called c:\apache-ant-1.10.5 with bin, etc, lib, manual folders within that.<br />
<br />
==== 1.4.3 Mix Old and New Tools ====<br />
<br />
Gideros uses Ant to build the player, unfortunately the tools to support Ant are now missing from the latest Android tools.<br />
<br />
<br />
There is a fix for this:<br />
<br />
# Rename the existing 'tools' folder in the Android SDK folder to 'tools_new'.<br />
# Download an older (March 2016) version of the tools and copy that folder to the Android SDK folder.<br />
# Copy the contents of 'tools_new' over the contents of 'tools'.<br />
<br />
Here is where you can download the compatible set of tools from:<br />
<br />
(PC) https://dl.google.com/android/repository/tools_r25.2.5-windows.zip<br />
<br />
(MAC) https://dl.google.com/android/repository/tools_r25.2.5-macosx.zip<br />
<br />
(LINUX) https://dl.google.com/android/repository/tools_r25.2.5-linux.zip<br />
<br />
------<br />
<br />
=== 1.5 Install Java ===<br />
You need the Java JDK<br />
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html<br />
<br />
------<br />
<br />
=== 1.6 (PC) Install Visual Studio ===<br />
https://www.visualstudio.com/downloads/<br />
<br />
Install [https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk Win 8.1 SDK]<br />
<br />
Install [https://marketplace.visualstudio.com/items?itemName=AdMediator.MicrosoftAdvertisingSDKforWindowsandWindowsPhone8x Microsoft Advertising SDK for Windows and Windows Phone 8.x]<br />
<br />
Ensure that you have MSBuild v12 or v14 installed (building with the makefile will fail with an incorrect version).<br />
<br />
------<br />
<br />
=== 1.7 (MAC) Install Xcode ===<br />
https://itunes.apple.com/fr/app/xcode/id497799835?mt=12<br />
<br />
------<br />
<br />
=== 1.8 Install QScintilla ===<br />
https://www.riverbankcomputing.com/software/qscintilla/download <br /><br />
Double click on the downloaded file and follow instructions.<br />
<br />
Recommended 2.10.8<br /><br />
Windows: https://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-2.10.8/QScintilla_gpl-2.10.8.zip<br /><br />
Mac OSX/Linux: https://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-2.10.8/QScintilla_gpl-2.10.8.tar.gz<br />
<br />
(PC) Unzip the file into the folder of your choice. <br />
<br />
(MAC) Move the created folder into the Applications subfolder of your home directory. <br />
<br />
(MAC) Open a terminal window <br />
<br />
(MAC) On the first install:<br />
<br />
<source lang="bash"><br />
sudo xCodebuild –license <br />
quit<br />
agree<br />
</source><br />
<br /><br />
''' With the command line, go to Q4Qt5 subfolder of QScintilla : '''<br />
<br />
On PC :<br />
<br />
Open Qt command prompt (called (eg) Qt 5.9.1 for Desktop). This command prompt just sets environment variables, allowing direct running of tools installed with Qt.<br />
<br />
Navigate to QScintilla's Qt4Qt5 subfolder with ‘cd’ command, then type :<br />
<br /><br />
<source lang="bash"><br />
qmake qscintilla.pro <br />
mingw32-make <br />
mingw32-make install <br />
</source><br />
<br /><br />
On Mac:<br />
Assuming X.x is your QT version, do the following : <br />
<br />
<source lang="bash"><br />
~/Qt/X.x/clang_64/bin/qmake qscintilla.pro <br />
make <br />
make install <br />
</source><br />
<br /><br />
On Linux:<br />
Locate qmake in your Qt installation, usually /opt/Qt/<version>/gcc_64/bin/qmake and run:<br />
<source lang="bash"><br />
/path/to/qmake qscintilla.pro <br />
make <br />
make install <br />
</source><br />
<br /><br />
For the debug build necessary for debugging Gideros Studio run:<br />
<source lang="bash"><br />
make -f Makefile.Debug # mingw32-make on Windows<br />
make -f Makefile.Debug install # mingw32-make on Windows<br />
</source><br />
<br />
<br />
------<br />
<br />
=== 1.9 Install Python ===<br />
https://www.python.org/downloads/release/python-2712/<br />
<br />
You need Python 2.7.12 or later to install emscripten properly.<br />
<br />
Once installed, add it to your command line path, eg: c:\python27, on windows you can do this by right-clicking on 'myComputer' or 'This PC', go to 'Properties', click 'Advanced System Settings', Click 'Environmental Variables', double-click 'Path', add 'c:\python27'.<br />
<br />
------<br />
<br />
=== 1.10 Install emscripten ===<br />
http://kripken.github.io/emscripten-site/<br />
<br />
You need this is you want to build for HTML5 + Facebook games.<br />
<br />
Using a shell or MSYS2 (previously installed) on windows, go to your home or C: folder and type:<br />
<source lang="bash"><br />
git clone https://github.com/juj/emsdk.git<br />
</source><br />
<br />
Once that has completed open a command prompt in that folder on Windows, on other system just cd to the folder.<br />
<br />
Using emsdk, install packages sdk, clang, node, python and emscripten.<br />
<br />
<source lang="bash"><br />
(on non-PC put ./ before emsdk)<br />
emsdk install latest<br />
emsdk activate latest<br />
</source><br />
<br />
(PC) Type:<br />
<source lang="bash"><br />
emsdk_env.bat<br />
</source><br />
<br />
(MAC) Type:<br />
<source lang="bash"><br />
source ./emsdk_env.sh<br />
</source><br />
<br />
These can also be installed within emsdk: git, crunch, and spidermonkey<br />
<source lang="bash"><br />
(on non-PC put ./ before emsdk)<br />
emsdk install git-1.9.4<br />
emsdk install crunch-1.03<br />
emsdk install spidermonkey-37.0.1-64bit<br />
emsdk activate git-1.9.4<br />
emsdk activate crunch-1.03<br />
emsdk activate spidermonkey-37.0.1-64bit<br />
(PC) emsdk_env.bat<br />
(MAC) source ./emsdk_env.sh<br />
</source><br />
<br />
(PC) Make sure the environment variable EM_CONFIG is set to the location of your emscripten config file.<br />
<br />
------<br />
<br />
=== 1.11 Install Steam SDK ===<br />
https://partner.steamgames.com/?goto=%2Fdownloads%2Fsteamworks_sdk.zip<br />
<br />
Extract the archive/zip file to your home or C: folder, for example if the file is called 'steamworks_sdk_142.zip' then you will have a 'c:\steamworks_sdk_142' folder with a solder called 'sdk' within it. The sdk folder contains other folders such as glmgr, public, tools, etc.<br />
<br />
This is necessary for the Steam plugin.<br />
<br />
------<br />
<br />
=== 1.12 Install Gideros ===<br />
<br />
==== 1.12.1 Fetch gideros source code ====<br />
(PC) Open MSYS2 32 bit shell<br />
<br />
(MAC/Linux) Open a terminal<br />
<br />
Navigate to the folder where you into to work.<br />
<br />
<source lang="bash"><br />
git clone https://github.com/gideros/gideros <br />
</source><br />
<br />
==== 1.12.2 Configure scripts ====<br />
Make a copy of the file gideros/scripts/Makefile.def.example, rename it to Makefile.def and update the file copy according <br />
to your installation. Ensure that the QT\_ARCH and QT_TOOLSARCH paths are formatted correctly according to your Qt <br />
install directory structure (see below that they are named differently by Qt).<br />
<br />
''''''Example:''''''<br />
<br />
'''On PC:'''<br />
<br />
For Qt:<br />
<br />
<source lang="bash>QTBASEDIR=/c/Qt<br />
QT_ARCH=mingw53_32<br />
QT_TOOLSARCH=mingw530_32<br />
QTVER=5.9.1<br />
QT5ICUVER=59<br />
<br />
STEAMSDK=/c/Applications/steamworks_sdk_142<br />
export STEAMSDK<br />
</source><br />
<br />
For Android:<br />
<br />
<source lang="bash"><br />
# on Windows, also add this to PATH<br />
NDK_HOME=/c/android/android-ndk-r17b<br />
<br />
NDKBUILD=cmd //c /c/android/android-ndk-r17b/ndk-build.cmd<br />
<br />
# remember to escape disallowed characters, or wrap in quotes<br />
JAVA_HOME=/c/Program\ Files\ \(x86\)/Java/jdk1.8.0_144<br />
ANT_HOME=/c/apache-ant-1.10.1<br />
ANDROID_HOME=C:/SDKs/Android/Sdk <br />
</source><br />
<br />
For WinRT:<br />
<br />
<source lang="bash"><br />
FXC="/c/Program Files (x86)/Windows Kits/8.1/bin/x86/fxc.exe" <br />
MSBUILD="/c/Program Files (x86)/MSBuild/14.0/Bin/MSbuild.exe" <br />
</source><br />
<br />
For html5:<br />
<br />
<source lang="bash"><br />
EMSDK=/c/emsdkwin<br />
EMSDKPATH=$(EMSDK):$(EMSDK)/clang/e1.35.0_64bit:$(EMSDK)/node/4.1.1_64bit/bin:$(EMSDK)/python/2.7.5.3_64bit:$(EMSDK)/emscripten/1.35.0<br />
EMSDK_PREFIX=PATH=$(EMSDKPATH):$$$$PATH cmd //c<br />
CRUNCHME=crunchme-win32.exe<br />
</source><br />
<br />
'''On MAC:''' <br />
<br />
<source lang="bash"><br />
QTBASEDIR=~/Qt QT_ARCH=clang_64 <br />
QT_TOOLSARCH=clang_64 <br />
QTVER=5.8 <br />
QT5ICUVER=54 #deprecated stuff <br />
</source><br />
<br />
<br />
Here is another [[Example Makefile.def file|example Makefile.def file]].<br />
<br />
==== 1.12.3 Fetch additional repositories ====<br />
Go into just cloned gideros source folder and run make prep.repo<br />
<source lang="bash"><br />
cd gideros<br />
make -f scripts/Makefile.gid prep.repo <br />
</source><br />
<br />
------<br />
<br />
== 2. Building ==<br />
<br />
If you have all dependencies in place for all targets, you can build everything at once via MSYS2 or Terminal with:<br />
<br />
<pre lang="bash"><br />
make -f scripts/Makefile.gid<br />
</pre><br />
<br />
=== 2.1 Compilation on PC :===<br />
<br />
Open MSYS2 shell (msys2_shell.cmd). Standard compilation is 32 bit so use a 32 bit shell. Make sure you have installed the necessary build tools in MSYS2 using pacman, as detailed in [[#1.2 (PC) Install MSYS2 Console|Install MSYS2 Console]].<br />
.<br />
<br />
Navigate to gideros folder <br />
<br />
==== 2.1.1 Build QT tools : ====<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid qtapp.install<br />
</pre><br />
<br />
-> files GiderosStudio.exe, GiderosPlayer.exe, GiderosTexturePacker.exe (…) in Build.Win folder <br />
<br />
==== 2.1.2 Android: ====<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid android.install <br />
</pre><br />
<br />
= file GiderosAndroidPlayer.apk in folder Build.Win/Players <br />
<br />
==== 2.1.3 winRT: ====<br />
<br />
''If necessary :''<br />
Open the solution, gideros/winRT_example/giderosgame.sln in Visual Studio. Check that the SQLite version for Windows and Windows Phone is up to date. Save and close the solution. <br />
<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid winrt.install <br />
</pre><br />
<br />
= file _bundle.appxupload in folder Build.Win/Players/WinRT<br />
<br />
==== 2.1.4 win32: ====<br />
<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid win32.install <br />
</pre><br />
<br />
= files in folder Build.Win/Templates/win32 <br />
<br />
==== 2.1.5 Html5: ====<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid html5.install<br />
</pre><br />
<br />
-> files in folders Build.Win//Players/Html5 and Build.Win/Templates/Html5<br />
<br />
==== 2.1.6 Plugins: ====<br />
<pre lang="bash"><br />
make –f scripts/Makefile.gid bundle.win <br />
</pre><br />
<br />
= folder bin and file gplugin in folder Build.Win/All Plugins<br />
<br />
==== 2.1.7 To build everything that can be built on Windows ====<br />
<source lang="bash"><br />
make -f scripts/Makefile.gid all<br />
</source><br />
<br />
<br />
=== 2.2 Compilation on Mac :===<br />
Open Terminal. <br />
<br />
cd to the folder « gideros » <br />
<br />
==== 2.2.1 QT : ====<br />
<pre lang="bash"><br />
make -f scripts/Makefile.gid qtapp.install <br />
</pre><br />
<br />
= GiderosStudio.exe, GiderosPlayer.exe, GiderosTexturePacker.exe (…) in folder Build.Mac <br />
<br />
==== 2.2.2 iOS : ====<br />
<pre lang="bash"><br />
make -f scripts/Makefile.gid ios.install <br />
</pre><br />
<br />
= GiderosiOSPlayer.zip in folder Buid.Mac/Players <br />
<br />
==== 2.2.3 Plugins: ====<br />
<pre lang="bash"><br />
make -f scripts/Makefile.gid bundle.mac <br />
</pre><br />
<br />
= folders bin and files gplugin in folder Buid.Mac/All Plugins</div>PaulRhttps://wiki.gideros.rocks/index.php?title=B2.World:createBody&diff=12778B2.World:createBody2018-10-05T18:43:31Z<p>PaulR: /* Parameters */</p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br />
Creates a rigid body given a definition. The body definition is given as an ordinary table. The fields of the body definition table are:<br /><br />
<br /><br />
'''type''': (number) The body type: [[Special:MyLanguage/b2.STATIC_BODY|b2.STATIC_BODY]], [[Special:MyLanguage/b2.KINEMATIC_BODY|b2.KINEMATIC_BODY]], or [[Special:MyLanguage/b2.DYNAMIC_BODY|b2.DYNAMIC_BODY]]. Note: if a dynamic body would have zero mass, the mass is set to one.<br /><br />
'''position''': (table) The world position of the body (see the example below to understand how this table is set). Avoid creating bodies at the origin since this can lead to many overlapping shapes.<br /><br />
'''angle''': (number) The world angle of the body in radians.<br /><br />
'''linearVelocity''': (table) The linear velocity of the body&#039;s origin in world co-ordinates (see the example below to understand how this table is set).<br /><br />
'''angularVelocity''': (number) The angular velocity of the body.<br /><br />
'''linearDamping''': (number) Linear damping is use to reduce the linear velocity. The damping parameter can be larger than 1.0 but the damping effect becomes sensitive to the time step when the damping parameter is large.<br /><br />
'''angularDamping''': (number) Angular damping is use to reduce the angular velocity. The damping parameter can be larger than 1.0 but the damping effect becomes sensitive to the time step when the damping parameter is large.<br /><br />
'''allowSleep''': (boolean) Set this flag to false if this body should never fall asleep. Note that this increases CPU usage.<br /><br />
'''awake''': (boolean) Is this body initially awake or sleeping?<br /><br />
'''fixedRotation''': (boolean) Should this body be prevented from rotating? Useful for characters.<br /><br />
'''bullet''': (boolean) Is this a fast moving body that should be prevented from tunneling through other moving bodies? Note that all bodies are prevented from tunneling through kinematic and static bodies. This setting is only considered on dynamic bodies. '''Warning:''' You should use this flag sparingly since it increases processing time.<br /><br />
'''active''': (boolean) Does this body start out active?<br /><br />
'''gravityScale''': (number) Scale the gravity applied to this body.<br /><br />
<br /><br />
The unset fields gets default values.<br /><br />
<br /><br />
'''Warning:''' This function is locked during callbacks.<br /><br />
<br />
<br /></translate><br />
<source lang="lua"><br />
(b2.Body) = b2.World:createBody(bodyDef)<br />
</source><br />
<br /><br />
=== <translate>Parameters</translate> ===<br />
'''bodyDef''': (table) <translate></translate><br />
<br/><br />
<br />
=== <translate>Return values</translate> ===<br />
'''<translate>Returns</translate>''' (b2.Body) <translate>created body.</translate><br/><br />
<br /><br />
=== <translate>Examples</translate> ===<br />
'''Example'''<br/><br />
<source lang="lua">local body = world:createBody{<br />
type = b2.STATIC_BODY,<br />
position = {x=0, y=0.5},<br />
angle = math.pi/4,<br />
linearVelocity = {x=0.1, y=0.2},<br />
}</source></div>PaulRhttps://wiki.gideros.rocks/index.php?title=B2.Fixture:setFilterData&diff=12777B2.Fixture:setFilterData2018-10-05T18:29:48Z<p>PaulR: </p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Fixture|b2.Fixture]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Sets the contact filtering data. This will not update contacts until the next time step<br /><br />
when either parent body is active and awake. The filter data definition is given<br /><br />
as a ordinary table. The fields of the filter data table are:<br /><br />
<ul><br /><br />
<li>''categoryBits'': (number) The collision category bits. Normally you would just set one bit.</li><br /><br />
<li>''maskBits'': (number) The collision mask bits. This states the categories that this shape would accept for collision.</li><br /><br />
<li>''groupIndex'': (number) Collision groups allow a certain group of objects to never collide (negative) or always collide (positive). Zero means no collision group. Non-zero group filtering always wins against the mask bits.</li><br /><br />
</ul><br />
<br /></translate><br />
<source lang="lua"><br />
b2.Fixture:setFilterData(filterData)<br />
</source><br />
=== <translate>Parameters</translate> ===<br />
'''filterData''': (table) <translate></translate> <br/><br />
=== <translate>Examples</translate> ===<br />
'''Example of fixtures collision filtering'''<br/><br />
<source lang="lua">local BALL_MASK = 1<br />
local CRATE_MASK = 2<br />
local WALL_MASK = 4<br />
<br />
-- ball<br />
local body = world:createBody{type = b2.DYNAMIC_BODY}<br />
local circle = b2.CircleShape.new(0, 0, radius)<br />
local fixture = body:createFixture{shape = circle, density = 1.0, <br />
friction = 0.1, restitution = 0.2}<br />
-- ball will collide with other ball and wall<br />
fixture:setFilterData({categoryBits = BALL_MASK, maskBits = BALL_MASK + WALL_MASK, groupIndex = 0})<br />
<br />
local body = world:createBody{type = b2.DYNAMIC_BODY}<br />
local poly = b2.PolygonShape.new()<br />
poly:setAsBox(width, height)<br />
local fixture = body:createFixture{shape = poly, density = 1.0, <br />
friction = 0.1, restitution = 0.2}<br />
-- crate will collide with other crate and wall<br />
fixture:setFilterData({categoryBits = CRATE_MASK, maskBits = CRATE_MASK + WALL_MASK, groupIndex = 0})<br />
<br />
local body = world:createBody{type = b2.STATIC_BODY}<br />
local chain = b2.ChainShape.new()<br />
chain:createLoop(<br />
0,0,<br />
application:getContentWidth(), 0,<br />
application:getContentWidth(), application:getContentHeight(),<br />
0, application:getContentHeight()<br />
)<br />
local fixture = body:createFixture{shape = chain, density = 1.0, <br />
friction = 1, restitution = 0.3}<br />
-- walls will collide with both balls and crates<br />
fixture:setFilterData({categoryBits = WALL_MASK, maskBits = CRATE_MASK + BALL_MASK, groupIndex = 0})</source></div>PaulRhttps://wiki.gideros.rocks/index.php?title=B2.Fixture:setFilterData&diff=12776B2.Fixture:setFilterData2018-10-05T18:29:29Z<p>PaulR: </p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
'''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Fixture|b2.Fixture]]<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
Sets the contact filtering data. This will not update contacts until the next time step<br /><br />
when either parent body is active and awake. The filter data definition is given<br /><br />
as a ordinary table. The fields of the filter data table are:<br /><br />
<ul><br /><br />
<li>''categoryBits'': (number) The collision category bits. Normally you would just set one bit.</li><br /><br />
<li>''maskBits'': (number) The collision mask bits. This states the categories that this shape would accept for collision.</li><br /><br />
<li>''groupIndex'': (number) Collision groups allow a certain group of objects to never collide (negative) or always collide (positive). Zero means no collision group. Non-zero group filtering always wins against the mask bits.</li><br /><br />
</ul><br /><br />
<br /></translate><br />
<source lang="lua"><br />
b2.Fixture:setFilterData(filterData)<br />
</source><br />
=== <translate>Parameters</translate> ===<br />
'''filterData''': (table) <translate></translate> <br/><br />
=== <translate>Examples</translate> ===<br />
'''Example of fixtures collision filtering'''<br/><br />
<source lang="lua">local BALL_MASK = 1<br />
local CRATE_MASK = 2<br />
local WALL_MASK = 4<br />
<br />
-- ball<br />
local body = world:createBody{type = b2.DYNAMIC_BODY}<br />
local circle = b2.CircleShape.new(0, 0, radius)<br />
local fixture = body:createFixture{shape = circle, density = 1.0, <br />
friction = 0.1, restitution = 0.2}<br />
-- ball will collide with other ball and wall<br />
fixture:setFilterData({categoryBits = BALL_MASK, maskBits = BALL_MASK + WALL_MASK, groupIndex = 0})<br />
<br />
local body = world:createBody{type = b2.DYNAMIC_BODY}<br />
local poly = b2.PolygonShape.new()<br />
poly:setAsBox(width, height)<br />
local fixture = body:createFixture{shape = poly, density = 1.0, <br />
friction = 0.1, restitution = 0.2}<br />
-- crate will collide with other crate and wall<br />
fixture:setFilterData({categoryBits = CRATE_MASK, maskBits = CRATE_MASK + WALL_MASK, groupIndex = 0})<br />
<br />
local body = world:createBody{type = b2.STATIC_BODY}<br />
local chain = b2.ChainShape.new()<br />
chain:createLoop(<br />
0,0,<br />
application:getContentWidth(), 0,<br />
application:getContentWidth(), application:getContentHeight(),<br />
0, application:getContentHeight()<br />
)<br />
local fixture = body:createFixture{shape = chain, density = 1.0, <br />
friction = 1, restitution = 0.3}<br />
-- walls will collide with both balls and crates<br />
fixture:setFilterData({categoryBits = WALL_MASK, maskBits = CRATE_MASK + BALL_MASK, groupIndex = 0})</source></div>PaulRhttps://wiki.gideros.rocks/index.php?title=B2.Body&diff=12775B2.Body2018-10-05T18:19:29Z<p>PaulR: </p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:b2.Body --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/><br />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/><br />
<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
A rigid body. These are created via [[Special:MyLanguage/b2.World:createBody|b2.World:createBody]].<br /><br />
<br /></translate><br />
=== <translate>Examples</translate> ===<br />
'''Creating Box2d body and moving Bitmap along the body'''<br/><br />
<source lang="lua">require "box2d"<br />
local world = b2.World.new(0, 10, true)<br />
<br />
--create ball bitmap object from ball graphic<br />
local ball = Bitmap.new(Texture.new("ball.png"))<br />
--reference center of the ball for positioning<br />
ball:setAnchorPoint(0.5,0.5)<br />
<br />
ball:setPosition(100,100)<br />
<br />
--get radius<br />
local radius = ball:getWidth()/2<br />
<br />
--create box2d physical object<br />
local body = world:createBody{type = b2.DYNAMIC_BODY}<br />
local circle = b2.CircleShape.new(0, 0, radius)<br />
local fixture = body:createFixture{shape = circle, density = 1.0, <br />
friction = 0.1, restitution = 0.2}<br />
ball.body = body<br />
<br />
--add to scene<br />
stage:addChild(ball)<br />
<br />
stage:addEventListener(Event.ENTER_FRAME, function()<br />
-- edit the step values if required. These are good defaults!<br />
world:step(1/60, 8, 3)<br />
ball:setPosition(ball.body:getPosition())<br />
ball:setRotation(math.rad(ball.body:getAngle()))<br />
end)</source><br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/b2.Body:applyAngularImpulse|b2.Body:applyAngularImpulse]] ''<translate>applies an angular impulse</translate>''<br/><!-- GIDEROSMTD:b2.Body:applyAngularImpulse(impulse) applies an angular impulse --><br />
[[Special:MyLanguage/b2.Body:applyForce|b2.Body:applyForce]] ''<translate>applies a force at a world point</translate>''<br/><!-- GIDEROSMTD:b2.Body:applyForce(forcex,forcey,pointx,pointy) applies a force at a world point --><br />
[[Special:MyLanguage/b2.Body:applyLinearImpulse|b2.Body:applyLinearImpulse]] ''<translate>applies an impulse at a point</translate>''<br/><!-- GIDEROSMTD:b2.Body:applyLinearImpulse(impulsex,impulsey,pointx,pointy) applies an impulse at a point --><br />
[[Special:MyLanguage/b2.Body:applyTorque|b2.Body:applyTorque]] ''<translate>applies a torque</translate>''<br/><!-- GIDEROSMTD:b2.Body:applyTorque(torque) applies a torque --><br />
[[Special:MyLanguage/b2.Body:createFixture|b2.Body:createFixture]] ''<translate>creates a fixture and attach it to this body</translate>''<br/><!-- GIDEROSMTD:b2.Body:createFixture(fixtureDef) creates a fixture and attach it to this body --><br />
[[Special:MyLanguage/b2.Body:destroyFixture|b2.Body:destroyFixture]] ''<translate>destroys a fixture</translate>''<br/><!-- GIDEROSMTD:b2.Body:destroyFixture(fixture) destroys a fixture --><br />
[[Special:MyLanguage/b2.Body:getAngle|b2.Body:getAngle]] ''<translate>returns the current world rotation angle in radians</translate>''<br/><!-- GIDEROSMTD:b2.Body:getAngle() returns the current world rotation angle in radians --><br />
[[Special:MyLanguage/b2.Body:getAngularDamping|b2.Body:getAngularDamping]] ''<translate>returns the angular damping of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:getAngularDamping() returns the angular damping of the body --><br />
[[Special:MyLanguage/b2.Body:getAngularVelocity|b2.Body:getAngularVelocity]] ''<translate>returns the angular velocity</translate>''<br/><!-- GIDEROSMTD:b2.Body:getAngularVelocity() returns the angular velocity --><br />
[[Special:MyLanguage/b2.Body:getGravityScale|b2.Body:getGravityScale]] ''<translate>returns the gravity scale of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:getGravityScale() returns the gravity scale of the body --><br />
[[Special:MyLanguage/b2.Body:getInertia|b2.Body:getInertia]] ''<translate>returns the rotational inertia of the body about the local origin in kg-m^2</translate>''<br/><!-- GIDEROSMTD:b2.Body:getInertia() returns the rotational inertia of the body about the local origin in kg-m^2 --><br />
[[Special:MyLanguage/b2.Body:getLinearDamping|b2.Body:getLinearDamping]] ''<translate>returns the linear damping of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:getLinearDamping() returns the linear damping of the body --><br />
[[Special:MyLanguage/b2.Body:getLinearVelocity|b2.Body:getLinearVelocity]] ''<translate>returns the linear velocity of the center of mass</translate>''<br/><!-- GIDEROSMTD:b2.Body:getLinearVelocity() returns the linear velocity of the center of mass --><br />
[[Special:MyLanguage/b2.Body:getLocalCenter|b2.Body:getLocalCenter]] ''<translate>returns the local position of the center of mass</translate>''<br/><!-- GIDEROSMTD:b2.Body:getLocalCenter() returns the local position of the center of mass --><br />
[[Special:MyLanguage/b2.Body:getLocalPoint|b2.Body:getLocalPoint]] <br/><!-- GIDEROSMTD:b2.Body:getLocalPoint(x,y) --><br />
[[Special:MyLanguage/b2.Body:getLocalVector|b2.Body:getLocalVector]] <br/><!-- GIDEROSMTD:b2.Body:getLocalVector(x,y) --><br />
[[Special:MyLanguage/b2.Body:getMass|b2.Body:getMass]] ''<translate>returns the total mass of the body in kilograms (kg)</translate>''<br/><!-- GIDEROSMTD:b2.Body:getMass() returns the total mass of the body in kilograms (kg) --><br />
[[Special:MyLanguage/b2.Body:getPosition|b2.Body:getPosition]] ''<translate>returns the world body origin position</translate>''<br/><!-- GIDEROSMTD:b2.Body:getPosition() returns the world body origin position --><br />
[[Special:MyLanguage/b2.Body:getWorldCenter|b2.Body:getWorldCenter]] ''<translate>returns the world position of the center of mass</translate>''<br/><!-- GIDEROSMTD:b2.Body:getWorldCenter() returns the world position of the center of mass --><br />
[[Special:MyLanguage/b2.Body:getWorldPoint|b2.Body:getWorldPoint]] <br/><!-- GIDEROSMTD:b2.Body:getWorldPoint(x,y) --><br />
[[Special:MyLanguage/b2.Body:getWorldVector|b2.Body:getWorldVector]] <br/><!-- GIDEROSMTD:b2.Body:getWorldVector(x,y) --><br />
[[Special:MyLanguage/b2.Body:isActive|b2.Body:isActive]] ''<translate>returns the active state of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:isActive() returns the active state of the body --><br />
[[Special:MyLanguage/b2.Body:isAwake|b2.Body:isAwake]] ''<translate>returns the sleeping state of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:isAwake() returns the sleeping state of the body --><br />
[[Special:MyLanguage/b2.Body:isBullet|b2.Body:isBullet]] <br/><!-- GIDEROSMTD:b2.Body:isBullet() --><br />
[[Special:MyLanguage/b2.Body:isFixedRotation|b2.Body:isFixedRotation]] <br/><!-- GIDEROSMTD:b2.Body:isFixedRotation() --><br />
[[Special:MyLanguage/b2.Body:isSleepingAllowed|b2.Body:isSleepingAllowed]] <br/><!-- GIDEROSMTD:b2.Body:isSleepingAllowed() --><br />
[[Special:MyLanguage/b2.Body:setActive|b2.Body:setActive]] ''<translate>sets the active state of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:setActive(flag) sets the active state of the body --><br />
[[Special:MyLanguage/b2.Body:setAngle|b2.Body:setAngle]] <br/><!-- GIDEROSMTD:b2.Body:setAngle(angle) --><br />
[[Special:MyLanguage/b2.Body:setAngularDamping|b2.Body:setAngularDamping]] ''<translate>sets the angular damping of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:setAngularDamping(angularDamping) sets the angular damping of the body --><br />
[[Special:MyLanguage/b2.Body:setAngularVelocity|b2.Body:setAngularVelocity]] ''<translate>sets the angular velocity</translate>''<br/><!-- GIDEROSMTD:b2.Body:setAngularVelocity(omega) sets the angular velocity --><br />
[[Special:MyLanguage/b2.Body:setAwake|b2.Body:setAwake]] ''<translate>sets the sleep state of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:setAwake(awake) sets the sleep state of the body --><br />
[[Special:MyLanguage/b2.Body:setBullet|b2.Body:setBullet]] <br/><!-- GIDEROSMTD:b2.Body:setBullet(flag) --><br />
[[Special:MyLanguage/b2.Body:setFixedRotation|b2.Body:setFixedRotation]] <br/><!-- GIDEROSMTD:b2.Body:setFixedRotation(flag) --><br />
[[Special:MyLanguage/b2.Body:setGravityScale|b2.Body:setGravityScale]] ''<translate>sets the gravity scale of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:setGravityScale(scale) sets the gravity scale of the body --><br />
[[Special:MyLanguage/b2.Body:setLinearDamping|b2.Body:setLinearDamping]] ''<translate>sets the linear damping of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:setLinearDamping(linearDamping) sets the linear damping of the body --><br />
[[Special:MyLanguage/b2.Body:setLinearVelocity|b2.Body:setLinearVelocity]] ''<translate>sets the linear velocity of the center of mass</translate>''<br/><!-- GIDEROSMTD:b2.Body:setLinearVelocity(x,y) sets the linear velocity of the center of mass --><br />
[[Special:MyLanguage/b2.Body:setPosition|b2.Body:setPosition]] ''<translate>sets the world body origin position</translate>''<br/><!-- GIDEROSMTD:b2.Body:setPosition(x,y) sets the world body origin position --><br />
[[Special:MyLanguage/b2.Body:setSleepingAllowed|b2.Body:setSleepingAllowed]] <br/><!-- GIDEROSMTD:b2.Body:setSleepingAllowed(flag) --><br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Events</translate> ===<br />
=== <translate>Constants</translate> ===<br />
|}</div>PaulRhttps://wiki.gideros.rocks/index.php?title=B2.ChainShape&diff=12774B2.ChainShape2018-10-05T18:18:31Z<p>PaulR: </p>
<hr />
<div>__NOTOC__<br />
<languages /><br />
<!-- GIDEROSOBJ:b2.ChainShape --><br />
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/><br />
'''<translate>Available since</translate>:''' Gideros 2012.2.2<br/><br />
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/b2.Shape|b2.Shape]]<br/><br />
<br/><br />
=== <translate>Description</translate> ===<br />
<translate><br /><br />
A chain shape is a free form sequence of line segments. The chain has two-sided collision, so you can use inside <br /><br />
and outside collision. Therefore, you may use any winding order. Connectivity information is used to create smooth collisions.<br /><br />
<br /><br />
'''Note:''' The chain will not collide properly if there are self-intersections.<br /><br />
<br />
<br /></translate><br />
=== <translate>Examples</translate> ===<br />
<br /><br />
'''Create world bounds using ChainShape'''<br/><br />
<source lang="lua">local body = world:createBody{type = b2.STATIC_BODY}<br />
body:setPosition(0, 0)<br />
local chain = b2.ChainShape.new()<br />
chain:createLoop(<br />
0,0,<br />
application:getContentWidth(), 0,<br />
application:getContentWidth(), application:getContentHeight(),<br />
0, application:getContentHeight()<br />
)<br />
local fixture = body:createFixture{shape = chain, density = 1.0, <br />
friction = 1, restitution = 0.3}</source><br />
{|-<br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Methods</translate> ===<br />
[[Special:MyLanguage/b2.ChainShape.new|b2.ChainShape.new]] <br/><!-- GIDEROSMTD:b2.ChainShape.new() --><br />
[[Special:MyLanguage/b2.ChainShape:createChain|b2.ChainShape:createChain]] ''<translate>creates a chain with isolated end vertices</translate>''<br/><!-- GIDEROSMTD:b2.ChainShape:createChain(vertices) creates a chain with isolated end vertices --><br />
[[Special:MyLanguage/b2.ChainShape:createLoop|b2.ChainShape:createLoop]] ''<translate>creates a loop</translate>''<br/><!-- GIDEROSMTD:b2.ChainShape:createLoop(vertices) creates a loop --><br />
| style="width: 50%; vertical-align:top;"|<br />
=== <translate>Events</translate> ===<br />
=== <translate>Constants</translate> ===<br />
|}</div>PaulR