Jump to content

  • Log In with Google      Sign In   
  • Create Account

Simplest way to get a slider?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 sprezzatura   Members   -  Reputation: 109

Like
0Likes
Like

Posted 16 November 2012 - 03:12 PM

What is the simplest way to show a slider control? I am not using DXUT, my understanding is that DXUT is an all-or-nothing proposition, you either use it for everything (device creation, etc), or not.

I would prefer not to get involved in adding a large library to my app.

I just want to the user to be able to slide the control up & down.

Thanks for your input.

Sponsor:

#2 papulko   Members   -  Reputation: 890

Like
0Likes
Like

Posted 17 November 2012 - 04:53 AM

I think this question needs a little clarification. For instance by slider, are you referring to a scrollbar (http://msdn.microsoft.com/en-us/library/windows/desktop/bb787529(v=vs.85).aspx)? Also, what language are you using?

#3 sprezzatura   Members   -  Reputation: 109

Like
0Likes
Like

Posted 17 November 2012 - 06:05 AM

I'm using C++, Win32 API, DirectX 9.

Is the slider you refer to a regular control? I tried creating a modeless dialog that included a slider bar, but it doesn't show up. I assume that the PeekMessage loop is stealing all the cycles. Also, would a regular Windows dialog work in full-screen mode?

I'm thinking of something like this:
slider Bar
Album: Screen shots
1 images
0 comments



Based on the DXUT example, I assume you have to use a specially designed slider. I am reduced to drawing lines with D3DXCreateLine, tracking the mouse coordinates, doing a hit test for the thumbtrack. Kinda primitive.

#4 Radikalizm   Crossbones+   -  Reputation: 2884

Like
3Likes
Like

Posted 17 November 2012 - 06:25 AM

There are quite a few GUI libraries available for use with DirectX which could provide you with a slider widget, libraries like Rocket and CEGUI come to mind, but I'm not sure what their development state is now (it's been a while since I've used them)

Another option would be to create a very basic ui system yourself, so you can write your own slider widget. You'd still use basic functions to draw your slider, but you could provide some clean encapsulation for mouse events and logic.

I gets all your texture budgets!


#5 sprezzatura   Members   -  Reputation: 109

Like
0Likes
Like

Posted 20 November 2012 - 06:21 AM

Thanks, I'll look into those libraries. Meanwhile, I wrote my own slider, it will do the job.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS