开发者

How to create an SDL pop up menu?

开发者 https://www.devze.com 2022-12-13 12:37 出处:网络
I\'ve seached around how to create a pop up menu in a SDL window application using c++ ? I haven\'t found any clues !

I've seached around how to create a pop up menu in a SDL window application using c++ ? I haven't found any clues !

I would like to have something that looks like this : http://www.youtube.com/watch?v=Mc_CE9OiHvA

I've tried to use glu开发者_JAVA百科tMenu, but it doesn't work ...

Thanks


SDL is a low-level graphics library. I don't remember seeing anything like menus, buttons, or other GUI controls in it last time I used it. It's possible that one of the many add-on libraries has menuing functions. Generally, you're expected to build such things yourself from primitives SDL provides.

One add-on library you might want to get is SDL_ttf, for drawing text using TrueType fonts. That and a few lines and mouse handers, et voilà, you have a menu.


SDL itself doesn't have any GUI libraries. That video looks like a guy who used SDL to write his own GUI using graphic primitive and font calls.

There are several SDL GUI libraries referenced on http://www.libsdl.org/libraries.php

How usable they are, I have no idea.

0

精彩评论

暂无评论...
验证码 换一张
取 消