Solved

Creating Labels/Buttons on SDL

Posted on 2010-09-23
2
1,038 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now