Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.


There have been some issues with the development of the GUI since the intended library we were going to use decided that it wouldn’t work with our rendering solution. And therefor we decided to change our plans on using that library and we made a new GUI from scratch with only the functions we thought was necessary. Each GUI-element will be placed in a GUIcontainer to allow the user to setup multiple menus or gui for the same scene. And easily switch between having the different containers locked on the screen or if they want it to be movable. For now there is 2 different types of elements that can be added to the container: GUIText and GUIButton. The GUIText is rendering a text from a font. The text is set when the object is created but can be altered while the program is running by calling the GUIManager for that element and then using the updateText function. The GUIButton element is a button with 4 different states: idle,down,pressed and clicked. This is so the user can handle specific differently and make the gui handle differently depending on how the buttons are clicked. To make the user see that he actualy is pressing a button they are given 2 different textures to switch between, one when the button is idle and waiting and one when it is being held down/clicked. The GUIText and GUIButton is inheriting from a base class GUIElement that will help the GUIManager handle all elements position, size and if the element is active. An inactive container sets all the elements in it to inactive to prevent buttons from being invisible but active. The GUIContainer has the ability to be dragged around, when a container is dragged all the elements in it is dragged with it.

In this picture the second button is being pressed down.


Be Sociable, Share!

Leave a comment  




Submit comment