Solved

Creating Labels/Buttons on SDL

Posted on 2010-09-23
2
1,046 Views
Last Modified: 2013-11-13
The requirement is to create label/buttons on Game Application which is using SDL
on embedded Linux, is this possible to create Labels/buttons using SDL with out using third party gui frame work.
0
Comment
Question by:tittu
2 Comments
 
LVL 33

Accepted Solution

by:
pgnatyuk earned 500 total points
ID: 33751118
SDL is a low-level access, it does not contain a function that will create a button. It does contain the function that allow to draw the text. But not a label as a GUI object.
This is possible to create a label or a button using SDL without a 3rd party framework. For a example, draw an image in a rectangle. When the application receives a mouse event, if the coordinates are in this rectangle, perform an action. This is the button. Make such reusable code in your program.
An example: http://www.lazyfoo.net/SDL_tutorials/lesson09/index.php

In case you don't have these links:
http://wiki.libsdl.org/moin.cgi/Tutorials
http://www.webkinesia.com/games/sdl-api.php
http://lazyfoo.net/SDL_tutorials/index.php

0
 

Author Closing Comment

by:tittu
ID: 33770037
agreed
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question