<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.gideros.rocks/index.php?action=history&amp;feed=atom&amp;title=Sprite%3AresolveStyle</id>
	<title>Sprite:resolveStyle - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.gideros.rocks/index.php?action=history&amp;feed=atom&amp;title=Sprite%3AresolveStyle"/>
	<link rel="alternate" type="text/html" href="https://wiki.gideros.rocks/index.php?title=Sprite:resolveStyle&amp;action=history"/>
	<updated>2026-11-17T17:37:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.gideros.rocks/index.php?title=Sprite:resolveStyle&amp;diff=24683&amp;oldid=prev</id>
		<title>MoKaLux: Created page with &quot;__NOTOC__ &#039;&#039;&#039;Available since:&#039;&#039;&#039; Gideros 2022.6&lt;br/&gt; &#039;&#039;&#039;Class:&#039;&#039;&#039; Sprite&lt;br/&gt;  === Description === Resolves a style reference from the given style table or the one attache...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.gideros.rocks/index.php?title=Sprite:resolveStyle&amp;diff=24683&amp;oldid=prev"/>
		<updated>2025-10-17T19:15:36Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__ &amp;#039;&amp;#039;&amp;#039;Available since:&amp;#039;&amp;#039;&amp;#039; Gideros 2022.6&amp;lt;br/&amp;gt; &amp;#039;&amp;#039;&amp;#039;Class:&amp;#039;&amp;#039;&amp;#039; &lt;a href=&quot;/index.php/Sprite&quot; title=&quot;Sprite&quot;&gt;Sprite&lt;/a&gt;&amp;lt;br/&amp;gt;  === Description === Resolves a style reference from the given style table or the one attache...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Available since:&amp;#039;&amp;#039;&amp;#039; Gideros 2022.6&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Class:&amp;#039;&amp;#039;&amp;#039; [[Sprite]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
Resolves a style reference from the given style table or the one attached to the sprite.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
(vary) = Sprite:resolveStyle(reference,style)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;reference&amp;#039;&amp;#039;&amp;#039;: (String) the style reference to retrieve from the styling table&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;style&amp;#039;&amp;#039;&amp;#039;: (table) the styling table&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Return values ===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Returns&amp;#039;&amp;#039;&amp;#039; (vary) the style reference value(s)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local style={&lt;br /&gt;
	cellColor=vector(1,0,0,1) --cellColor is Red initially&lt;br /&gt;
}&lt;br /&gt;
for i=1,10 do&lt;br /&gt;
	local p=Pixel.new(vector(0,0,0,0),10,10)	&lt;br /&gt;
	p:setX((i-1)*15)&lt;br /&gt;
	p:setStyle(style)&lt;br /&gt;
	p:setColor(&amp;quot;cellColor&amp;quot;)&lt;br /&gt;
	stage:addChild(p)&lt;br /&gt;
end&lt;br /&gt;
Core.asyncCall(function()&lt;br /&gt;
	Core.yield(3) --Wait 3s&lt;br /&gt;
	style.cellColor=vector(0,1,0,1) --Set cellColor to green&lt;br /&gt;
	for i=1,10 do&lt;br /&gt;
		stage:getChildAt(i):setStyle(style)&lt;br /&gt;
		print(stage:getChildAt(i):resolveStyle(&amp;quot;cellColor&amp;quot;,style))&lt;br /&gt;
	end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== See also ===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[Sprite:setStyle]]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{Sprite}}&lt;/div&gt;</summary>
		<author><name>MoKaLux</name></author>
	</entry>
</feed>