Feature Request

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Spidla
Posts: 31
Joined: Tue Nov 25, 2003 3:46 pm
Location: Czech Republic
Contact:

Feature Request

Post by Spidla »

I have some possible features :
ProgressBar GUI Element (skinnable if possible)
Console (i think console that open from the top of screen like int Quake 3 Engine) with input box (so I need also EditBox GUI Element)

Another stupid question, what about Irrlicht 0.5 ??? (in development section are written very good features for 0.5)
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

I have created a drop-down console in previous projects (not using the IrrLicht engine). I am currently working on something called the ICE Framework, in which I aim to add features that will be useful to anyone starting a new project.

I could definately add drop-down console functionality in a later version.
a screen cap is worth 0x100000 DWORDS
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Wouldn't a dropdown console just be a hybrid edit box?

The solution that I am using is a lot less elegant. When I press ~, it shows a static text box. From that point, all keypresses "go to" that static box. When the user hits enter, I addItem() and clear the Static Text, the command to an attached ListBox and keep adding debug lines to it. Unfortunately, there doesn't currently exist a ListBox->removeItem(), so I just clear the box completely when 50 items are added to it.
Crud, how do I do this again?
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

thats probably the way i'd do it for ICE, except I'd also have a class which would keep function pointers and their 'command names'

when you hit 'enter' it will tokenize the string inputted. if the first token matches one of the 'command names' in the function pointer hash, it will send the other tokens to the associated function. this way you can write functions that will perform the commands you want to support, then add them to the hash with their 'command name'.

this is what i did in those previous projects. its pretty simple, but very useful.
a screen cap is worth 0x100000 DWORDS
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

That's close to what I have, I just funnel out all the commands to a LUA script to handle the parsing and tell the game engine what to do next. That way, I can customize my menus and still get the same functionality.

LUA can handle text comparisions quickly, but it's one downside is that there are no switch() statements. I have to do it all as one big IF...ELSEIF ELSEIF...ELSE...END. Which is what C does in a switch statement anyhow.

Since I found out about CaLua, it's been a breeze to script out all the functionality instead of having all the hardcoding.
Crud, how do I do this again?
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

how does that work anyways?

Post by buhatkj »

th elua scripting, how does tha happen. can lua call a method from or access a member of an object you have written in c++? i had also been looking at trying to embed PERL(my favorite scripting lang, but seemingly a nightmare to embed...) in Fmorg as the scripting lang of choice....
-Ted
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

typically for any scripting engine, you start up the engine, then you give it function pointers to functs/classes you've written that you want to expose to scripts.
a screen cap is worth 0x100000 DWORDS
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Lua is easy to integrate by using a project called CaLua (http://calua.sourceforge.net). It handles all the stack crud. You just define the Lua functions that C++ can call and all the c++ functions that Lua can call.
Crud, how do I do this again?
Epsilon
Posts: 38
Joined: Fri Jan 09, 2004 1:46 pm
Location: Argentina

ProgressBar

Post by Epsilon »

The ProgressBar is easy to implement and not need to be a GUI Object.

In the Unreal Engine dont have a GUIProgressBar but it can be easy implemented changing the scale of a Texture.

You only need load the texture and change the XScale and YScale (In UT are float variables), for a Progress bar you set YScale to a constante value and XScale is the progress where 1.000 is 100%. This is an horizontal Progressbar.

good look !
Post Reply