Forums

Slider talk [bug?]
Last Post 09 May 2015 03:49 PM by Temeez. 5 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
TemeezUser is Offline
New Member
New Member
Posts:11


--
06 May 2015 02:28 PM
    I made a gif to show what I mean: http://i.imgur.com/F582TCi.gifv

    Any ideas what could do this? The color shown is the GraphicsDevice.Clear(color); Using the newest EmptyKeys version (also happened in the older one) with MonoGame.

    Edited: the title so this topic can be used to discuss sliders, no need to make tens of new topics.
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:669


    --
    06 May 2015 02:43 PM
    This is problem that your UI is invalidated before Draw. Are you updating anything in UI based on those sliders or do you have some other thread updating UI?
    TemeezUser is Offline
    New Member
    New Member
    Posts:11


    --
    06 May 2015 03:12 PM

    Posted By <a href='http://emptykeys.com/Activity-Feed/userid/1' class='af-profile-link'>Filip Dušek</a> on 06 May 2015 02:43 PM
    This is problem that your UI is invalidated before Draw. Are you updating anything in UI based on those sliders or do you have some other thread updating UI?


    Looks like I found the problem. I had a MainMenu screen under the Options screen which has the slider UI stuff. Thanks for your help!
    TemeezUser is Offline
    New Member
    New Member
    Posts:11


    --
    09 May 2015 12:35 PM
    New slider dilemma! The slider value doesn't change when I press a button with int.TryParse().

    http://pastebin.com/4NfFCR4q
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:669


    --
    09 May 2015 03:22 PM
    Only property can tell the other systems that it was changed. You can not use field of property as out parameter this way. You could use another local variable tho.

    
    int value = 0;
    SliderValue = int.TryParse(data["Slider"]["value"], out value) ? value : 100;
    
    
    TemeezUser is Offline
    New Member
    New Member
    Posts:11


    --
    09 May 2015 03:49 PM

    Posted By Filip Dušek on 09 May 2015 03:22 PM
    Only property can tell the other systems that it was changed. You can not use field of property as out parameter this way. You could use another local variable tho.

    
    int value = 0;
    SliderValue = int.TryParse(data["Slider"]["value"], out value) ? value : 100;
    
    



    Aah, I see, thank you!
    You are not authorized to post a reply.