?
Solved

Creating Labels/Buttons on SDL

Posted on 2010-09-23
2
Medium Priority
?
1,072 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 1500 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

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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 …
Starting up a Project
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

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