Jump to content
  • Advertisement
Sign in to follow this  
allegnewb

Radio button function.

This topic is 4251 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to finish a function for a radio button class I'm working on called is_selected, but since I'm an idiot, it's a little difficult. I'm using Allegro. Basically I want this function to do this: 1) Check to see if the object that's stored in the vector is in fact of the radio button class by checking it's type. (type = radio) All my GUI objects are stored in the same vector. 2) Check to see what the group ID is. 3) Check to see if your mouse is hovered over the object. 4) Check to see if you clicked on the object. If so, that object will become selected and all other objects within that group will become unselected. This will also return true. If nothing is clicked, then return false. So outside the class it would be used something like this: if(myRadioButtonInstance->is_selected()) { // do some stuff }

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!