home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
memory plugin-newbie plugin dev. questions
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="newbie23" data-source="post: 18951" data-attributes="member: 14252"><p><strong>GUI updating</strong></p><p></p><p>Thank you for the responses to my question, but at the moment I have not yet succeeded in showing something for a few seconds and then showing something else. For example, the code that I use is similar to the code below. I set the label of a control to text A, I wait for 2.5 seconds and then update the label to text B. The result is that text A is never shown and that after 2.5 seconds, text B is immediately shown. So I expect that at the point marked by xxxxxxxxxx there must be some statement that forces the GUI to update itself. I tried things like DoUpdate(),Refresh(), Render(), GUIControl.RefreshControl,.. but none of them seems to actually do something (as explained in the first reply to my original question). What statement should be placed instead of the xxxxxxx's. Thanks in advance for any sugggestions? (without this the memory game is more or less useless, I have now solved it with an extra click from the user to explicitly change the images but this is rather annoying)</p><p></p><p></p><p>GUILabelControl Playerlabel=GetControl((int)Controls.CONTROL_PLAYERNAME) as GUILabelControl;</p><p></p><p>playerlabel.Label=”current player is player 1”;</p><p></p><p>xxxxxxxxxx</p><p></p><p>int start=Environment.TickCount;</p><p>int timepassed=0;</p><p></p><p> while(timepassed<2500){</p><p> timepassed=Environment.TickCount-start;</p><p> //System.Threading.Thread.Sleep(100);</p><p> }</p><p></p><p>playerlabel.Label=”current player is player 2”;</p></blockquote><p></p>
[QUOTE="newbie23, post: 18951, member: 14252"] [b]GUI updating[/b] Thank you for the responses to my question, but at the moment I have not yet succeeded in showing something for a few seconds and then showing something else. For example, the code that I use is similar to the code below. I set the label of a control to text A, I wait for 2.5 seconds and then update the label to text B. The result is that text A is never shown and that after 2.5 seconds, text B is immediately shown. So I expect that at the point marked by xxxxxxxxxx there must be some statement that forces the GUI to update itself. I tried things like DoUpdate(),Refresh(), Render(), GUIControl.RefreshControl,.. but none of them seems to actually do something (as explained in the first reply to my original question). What statement should be placed instead of the xxxxxxx's. Thanks in advance for any sugggestions? (without this the memory game is more or less useless, I have now solved it with an extra click from the user to explicitly change the images but this is rather annoying) GUILabelControl Playerlabel=GetControl((int)Controls.CONTROL_PLAYERNAME) as GUILabelControl; playerlabel.Label=”current player is player 1”; xxxxxxxxxx int start=Environment.TickCount; int timepassed=0; while(timepassed<2500){ timepassed=Environment.TickCount-start; //System.Threading.Thread.Sleep(100); } playerlabel.Label=”current player is player 2”; [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
memory plugin-newbie plugin dev. questions
Contact us
RSS
Top
Bottom