<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Immediate GUIs in XNA: Setup and a button</title>
	<atom:link href="http://roy-t.nl/index.php/2010/03/10/immediate-guis-in-xna-setup-and-a-button/feed/" rel="self" type="application/rss+xml" />
	<link>http://roy-t.nl/index.php/2010/03/10/immediate-guis-in-xna-setup-and-a-button/</link>
	<description>My programming world</description>
	<lastBuildDate>Fri, 03 Feb 2012 10:12:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Esente</title>
		<link>http://roy-t.nl/index.php/2010/03/10/immediate-guis-in-xna-setup-and-a-button/comment-page-1/#comment-2253</link>
		<dc:creator>Esente</dc:creator>
		<pubDate>Mon, 21 Feb 2011 05:02:59 +0000</pubDate>
		<guid isPermaLink="false">http://roy-t.nl/?p=307#comment-2253</guid>
		<description>Yeah, moving Begin() and End() to outside of the loop works. Silly me :P

For problem #2, I guess I will just create a property for my HUD, then let the DoLabel() take in that property as argument. My ResourceManager will change the property somewhere else.</description>
		<content:encoded><![CDATA[<p>Yeah, moving Begin() and End() to outside of the loop works. Silly me <img src='http://roy-t.nl/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>For problem #2, I guess I will just create a property for my HUD, then let the DoLabel() take in that property as argument. My ResourceManager will change the property somewhere else.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roy Triesscheijn</title>
		<link>http://roy-t.nl/index.php/2010/03/10/immediate-guis-in-xna-setup-and-a-button/comment-page-1/#comment-2252</link>
		<dc:creator>Roy Triesscheijn</dc:creator>
		<pubDate>Sun, 20 Feb 2011 14:06:54 +0000</pubDate>
		<guid isPermaLink="false">http://roy-t.nl/?p=307#comment-2252</guid>
		<description>Hey Esente,

Text will be draw because of a given make sure to model your gui independetly from your model, in that case if the model changes state the gui will be able to reflect that with different text. (I hope this makes sense to you).

For the problem with buttons, try moving _imgui.Begin(); and End() outside of the for loop.</description>
		<content:encoded><![CDATA[<p>Hey Esente,</p>
<p>Text will be draw because of a given make sure to model your gui independetly from your model, in that case if the model changes state the gui will be able to reflect that with different text. (I hope this makes sense to you).</p>
<p>For the problem with buttons, try moving _imgui.Begin(); and End() outside of the for loop.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Esente</title>
		<link>http://roy-t.nl/index.php/2010/03/10/immediate-guis-in-xna-setup-and-a-button/comment-page-1/#comment-2250</link>
		<dc:creator>Esente</dc:creator>
		<pubDate>Sun, 20 Feb 2011 06:17:46 +0000</pubDate>
		<guid isPermaLink="false">http://roy-t.nl/?p=307#comment-2250</guid>
		<description>Hi,

I have to say I was really exciting when I see this post. I was working on a structure for GUI for my game, and if I hadn&#039;t found this, I would have stucked with many classes for buttons, image, etc...

While I&#039;m trying this type of GUI, i have some difficulties:

1. I think this is mostly suited for interactive controls such as buttons, scrollbars, sliders, etc. For static controls like label, image, I don&#039;t know how useful it is except drawing a texture or a string.

2. When creating a label, the text of the label will be updated by some other object. since IMGUI does not really create a Label object, how would you change the text when DoLabel on some update condition?

3. In my HUD I have a section for buttons consisting of 9 slots, putting in an array Buttons = Texture2D[9]. Normally, I would do:

&lt;code&gt;
for (int i=0; i&lt;Buttons.Length; i++) {
    var tex = Buttons[i];
    if (tex == null) continue;
    
    _imgui.Begin();
    if (_imgui.DoButton(i, SlotToRectangle(i), tec) {
        // Do some event
    }

    _imgui.End();
}
&lt;/code&gt;

However, only slot 0 works; that is, only when I click on button 0, the event happens. Do you have any idea why?

Sorry for the long list of questions! I&#039;m hoping you can find some timea in your busy schedule to answer them. Thanks.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I have to say I was really exciting when I see this post. I was working on a structure for GUI for my game, and if I hadn&#8217;t found this, I would have stucked with many classes for buttons, image, etc&#8230;</p>
<p>While I&#8217;m trying this type of GUI, i have some difficulties:</p>
<p>1. I think this is mostly suited for interactive controls such as buttons, scrollbars, sliders, etc. For static controls like label, image, I don&#8217;t know how useful it is except drawing a texture or a string.</p>
<p>2. When creating a label, the text of the label will be updated by some other object. since IMGUI does not really create a Label object, how would you change the text when DoLabel on some update condition?</p>
<p>3. In my HUD I have a section for buttons consisting of 9 slots, putting in an array Buttons = Texture2D[9]. Normally, I would do:</p>
<p><code><br />
for (int i=0; i&lt;Buttons.Length; i++) {<br />
    var tex = Buttons[i];<br />
    if (tex == null) continue;</p>
<p>    _imgui.Begin();<br />
    if (_imgui.DoButton(i, SlotToRectangle(i), tec) {<br />
        // Do some event<br />
    }</p>
<p>    _imgui.End();<br />
}<br />
</code></p>
<p>However, only slot 0 works; that is, only when I click on button 0, the event happens. Do you have any idea why?</p>
<p>Sorry for the long list of questions! I&#8217;m hoping you can find some timea in your busy schedule to answer them. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Esente</title>
		<link>http://roy-t.nl/index.php/2010/03/10/immediate-guis-in-xna-setup-and-a-button/comment-page-1/#comment-2249</link>
		<dc:creator>Esente</dc:creator>
		<pubDate>Sun, 20 Feb 2011 06:17:07 +0000</pubDate>
		<guid isPermaLink="false">http://roy-t.nl/?p=307#comment-2249</guid>
		<description>Hi,

I have to say I was really exciting when I see this post. I was working on a structure for GUI for my game, and if I hadn&#039;t found this, I would have stucked with many classes for buttons, image, etc...

While I&#039;m trying this type of GUI, i have some difficulties:

1. I think this is mostly suited for interactive controls such as buttons, scrollbars, sliders, etc. For static controls like label, image, I don&#039;t know how useful it is except drawing a texture or a string.

2. When creating a label, the text of the label will be updated by some other object. since IMGUI does not really create a Label object, how would you change the text when DoLabel on some update condition?

3. In my HUD I have a section for buttons consisting of 9 slots, putting in an array Buttons = Texture2D[9]. Normally, I would do:

&lt;code&gt;
for (int i=0; i&lt;Buttons.Length; i++) {
    var tex = Buttons[i];
    if (tex == null) continue;
    
    _imgui.Begin();
    if (_imgui.DoButton(i, SlotToRectangle(i), tec) {
        // Do some event
    }

    _imgui.End();
}
&lt;/code&gt;

However, only slot 0 works; that is, only when I click on button 0, the event happens. Do you have any idea why?

Sorry for the long list of questions! I&#039;m hoping you can find some time in your busy schedule to answer them. Thanks.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I have to say I was really exciting when I see this post. I was working on a structure for GUI for my game, and if I hadn&#8217;t found this, I would have stucked with many classes for buttons, image, etc&#8230;</p>
<p>While I&#8217;m trying this type of GUI, i have some difficulties:</p>
<p>1. I think this is mostly suited for interactive controls such as buttons, scrollbars, sliders, etc. For static controls like label, image, I don&#8217;t know how useful it is except drawing a texture or a string.</p>
<p>2. When creating a label, the text of the label will be updated by some other object. since IMGUI does not really create a Label object, how would you change the text when DoLabel on some update condition?</p>
<p>3. In my HUD I have a section for buttons consisting of 9 slots, putting in an array Buttons = Texture2D[9]. Normally, I would do:</p>
<p><code><br />
for (int i=0; i&lt;Buttons.Length; i++) {<br />
    var tex = Buttons[i];<br />
    if (tex == null) continue;</p>
<p>    _imgui.Begin();<br />
    if (_imgui.DoButton(i, SlotToRectangle(i), tec) {<br />
        // Do some event<br />
    }</p>
<p>    _imgui.End();<br />
}<br />
</code></p>
<p>However, only slot 0 works; that is, only when I click on button 0, the event happens. Do you have any idea why?</p>
<p>Sorry for the long list of questions! I&#8217;m hoping you can find some time in your busy schedule to answer them. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roy Triesscheijn</title>
		<link>http://roy-t.nl/index.php/2010/03/10/immediate-guis-in-xna-setup-and-a-button/comment-page-1/#comment-809</link>
		<dc:creator>Roy Triesscheijn</dc:creator>
		<pubDate>Thu, 28 Oct 2010 17:43:54 +0000</pubDate>
		<guid isPermaLink="false">http://roy-t.nl/?p=307#comment-809</guid>
		<description>Thanks for your comment, I hope this will get you started. Let me know when I can play

&quot;Saad&#039;s Age of Empires&quot;  :)</description>
		<content:encoded><![CDATA[<p>Thanks for your comment, I hope this will get you started. Let me know when I can play</p>
<p>&#8220;Saad&#8217;s Age of Empires&#8221;  <img src='http://roy-t.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saad</title>
		<link>http://roy-t.nl/index.php/2010/03/10/immediate-guis-in-xna-setup-and-a-button/comment-page-1/#comment-808</link>
		<dc:creator>Saad</dc:creator>
		<pubDate>Thu, 28 Oct 2010 17:15:02 +0000</pubDate>
		<guid isPermaLink="false">http://roy-t.nl/?p=307#comment-808</guid>
		<description>Very Nice tutorials!
I really need them to get a start on making my own Age of Empires :P</description>
		<content:encoded><![CDATA[<p>Very Nice tutorials!<br />
I really need them to get a start on making my own Age of Empires <img src='http://roy-t.nl/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Haigha</title>
		<link>http://roy-t.nl/index.php/2010/03/10/immediate-guis-in-xna-setup-and-a-button/comment-page-1/#comment-409</link>
		<dc:creator>Haigha</dc:creator>
		<pubDate>Fri, 02 Apr 2010 12:40:37 +0000</pubDate>
		<guid isPermaLink="false">http://roy-t.nl/?p=307#comment-409</guid>
		<description>How you find ideas for articles, I am always lack of new ideas for articles. Some tips would be great</description>
		<content:encoded><![CDATA[<p>How you find ideas for articles, I am always lack of new ideas for articles. Some tips would be great</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roy Triesscheijn’s Weblog &#187; Blog Archive &#187; Immediate GUIs in XNA: Scrollbars</title>
		<link>http://roy-t.nl/index.php/2010/03/10/immediate-guis-in-xna-setup-and-a-button/comment-page-1/#comment-401</link>
		<dc:creator>Roy Triesscheijn’s Weblog &#187; Blog Archive &#187; Immediate GUIs in XNA: Scrollbars</dc:creator>
		<pubDate>Tue, 30 Mar 2010 19:57:09 +0000</pubDate>
		<guid isPermaLink="false">http://roy-t.nl/?p=307#comment-401</guid>
		<description>[...] Immediate GUIs in XNA: Setup and a button [...]</description>
		<content:encoded><![CDATA[<p>[...] Immediate GUIs in XNA: Setup and a button [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roy Triesscheijn</title>
		<link>http://roy-t.nl/index.php/2010/03/10/immediate-guis-in-xna-setup-and-a-button/comment-page-1/#comment-378</link>
		<dc:creator>Roy Triesscheijn</dc:creator>
		<pubDate>Fri, 19 Mar 2010 09:31:35 +0000</pubDate>
		<guid isPermaLink="false">http://roy-t.nl/?p=307#comment-378</guid>
		<description>Damn, and I even did that two times. Altough it&#039;s not really wrong, it&#039;s of course nicer to say:
&lt;code&gt;
return mouse.LeftButton == ButtonState.Released &amp;&amp; hotItem == id &amp;&amp; activeItem == id;
&lt;/code&gt;

And
&lt;code&gt;
return rectangle.Contains(new Point(mouse.X, mouse.Y)
&lt;/code&gt;

The second one slipped in because at first I did some extra checks, but the first one is unexcusable, thanks for pointing these two out! I&#039;ll fix them immediately.</description>
		<content:encoded><![CDATA[<p>Damn, and I even did that two times. Altough it&#8217;s not really wrong, it&#8217;s of course nicer to say:<br />
<code><br />
return mouse.LeftButton == ButtonState.Released &amp;&amp; hotItem == id &amp;&amp; activeItem == id;<br />
</code></p>
<p>And<br />
<code><br />
return rectangle.Contains(new Point(mouse.X, mouse.Y)<br />
</code></p>
<p>The second one slipped in because at first I did some extra checks, but the first one is unexcusable, thanks for pointing these two out! I&#8217;ll fix them immediately.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://roy-t.nl/index.php/2010/03/10/immediate-guis-in-xna-setup-and-a-button/comment-page-1/#comment-377</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 19 Mar 2010 08:15:52 +0000</pubDate>
		<guid isPermaLink="false">http://roy-t.nl/?p=307#comment-377</guid>
		<description>Whats the difference:
&lt;code&gt;
if (mouse.LeftButton == ButtonState.Released &amp;&amp; hotItem == id &amp;&amp; activeItem == id)
40
        return true;
41
      return false;

&lt;/code&gt;

or
&lt;code&gt;
return mouse.LeftButton == ButtonState.Released &amp;&amp; 
      hotItem == id 
      &amp;&amp; activeItem == id;
&lt;/code&gt;

Basicly, what you are saying is:

&lt;code&gt;
if(something == true)
 return true;
else if(something == false)
 return false;
&lt;/code&gt;
That doesnt look right IMHO.</description>
		<content:encoded><![CDATA[<p>Whats the difference:<br />
<code><br />
if (mouse.LeftButton == ButtonState.Released &amp;&amp; hotItem == id &amp;&amp; activeItem == id)<br />
40<br />
        return true;<br />
41<br />
      return false;</p>
<p></code></p>
<p>or<br />
<code><br />
return mouse.LeftButton == ButtonState.Released &amp;&amp;<br />
      hotItem == id<br />
      &amp;&amp; activeItem == id;<br />
</code></p>
<p>Basicly, what you are saying is:</p>
<p><code><br />
if(something == true)<br />
 return true;<br />
else if(something == false)<br />
 return false;<br />
</code><br />
That doesnt look right IMHO.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

