Solved

Creating Labels/Buttons on SDL

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB6 Compile Compatibility Issue 4 116
tvirtualstringtree freeze when load too manny images 10 73
Help Required 3 108
Identify two keyboard codes and how to enter them 9 57
This article will show, step by step, how to integrate R code into a R Sweave document
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.
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 …

820 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