Solved

Creating Labels/Buttons on SDL

Posted on 2010-09-23
2
1,058 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A short article about a problem I had getting the GPS LocationListener working.
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.
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 …
Six Sigma Control Plans

728 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