Hey there. Me again with some questions. Hope you can help me.
1- In this program I'm making, I need that when the user press the Key Enter (Return), certain button on screen get pressed. The thing is, the button is not always the same (the button is on a window, there are several types of windows, but only one of them active at a time, hence, only one button on screen). How can I make that when the user press Enter the button get "pressed" as well (as if the user would have pressed it by himself)? I can take the long road and ask the program which window was active, and do what the button is supposed to do manually, but is there a faster way to just say the button "press yourself when the user press Enter"?
2- Does anyone know of a library that helps me create codified save files for games that works with Irrlicht?
3- Is there a way to maximize the main window (the device) as soon as it's created?
4- Is there a function to know which window of a GUI environment is currently active?
5- Does anyone know of a way to create curve lines in Irrlicht (splines, circle arcs, sine curves, etc)? Or do I have to create myself the mathematical function and find the points and draw several lines to do that?
6- Is there a way to move the geometrical centre of the main window (point x,y = 0,0) from the top left corner to the centre of the window (this is, the point 0,0 located in the centre of the window, not the top left corner)?
Thanks in advance for your time.
Some questions...
-
- Posts: 86
- Joined: Wed Aug 29, 2007 10:45 pm
Some questions...
Proud member of the Online Campaign for Real English. If you believe in capital letters, correct spelling and good sentence structure then copy this into your signature.
Re: Some questions...
env->setFocus(MyButton), then space or return will press the button for you.Magus_Stragus wrote:Hey there. Me again with some questions. Hope you can help me.
1- In this program I'm making, I need that when the user press the Key Enter (Return), certain button on screen get pressed. The thing is, the button is not always the same (the button is on a window, there are several types of windows, but only one of them active at a time, hence, only one button on screen). How can I make that when the user press Enter the button get "pressed" as well (as if the user would have pressed it by himself)? I can take the long road and ask the program which window was active, and do what the button is supposed to do manually, but is there a faster way to just say the button "press yourself when the user press Enter"?
see createXMLReader, createXMLWriter*, loadScene and saveScene functions.2- Does anyone know of a library that helps me create codified save files for games that works with Irrlicht?
Read the code to the demo in the examples dir.3- Is there a way to maximize the main window (the device) as soon as it's created?
getFocus() then call getParent() and getType() on the elements until you find a window.4- Is there a function to know which window of a GUI environment is currently active?
Yep, you'll need to make it yourself and use draw3dLine or one of the other 3d drawing calls (see IVideoDriver docs)5- Does anyone know of a way to create curve lines in Irrlicht (splines, circle arcs, sine curves, etc)? Or do I have to create myself the mathematical function and find the points and draw several lines to do that?
Not without modifying the engine. It would be easier to just subtract half the viewport width and height from the mouse coordinates.6- Is there a way to move the geometrical centre of the main window (point x,y = 0,0) from the top left corner to the centre of the window (this is, the point 0,0 located in the centre of the window, not the top left corner)?
-
- Posts: 86
- Joined: Wed Aug 29, 2007 10:45 pm
-
- Posts: 86
- Joined: Wed Aug 29, 2007 10:45 pm
I'm sorry, but I didn't find anything pointing to maximize the window upon execution on the demo. I found to put it on fullscreen ode, but that's not what I want. I want to maximize it. How can I do that?
Proud member of the Online Campaign for Real English. If you believe in capital letters, correct spelling and good sentence structure then copy this into your signature.
Good question really, i wanted to do this at one point but i decided to just go with fullscreen, though if you want the window bar at the top you can't do that obviously.
You can find the current desktop resolution easily with the null driver and then create a device of that size but that will actually make the window slightly bigger than maximised. I then tried to make the window 95% less than the current desktop size but that killed the render quality for some reason...
You can find the current desktop resolution easily with the null driver and then create a device of that size but that will actually make the window slightly bigger than maximised. I then tried to make the window 95% less than the current desktop size but that killed the render quality for some reason...
-
- Posts: 86
- Joined: Wed Aug 29, 2007 10:45 pm
So, it's impossible to do that...
I have that problem as well, when I use a device size larger than 800x600 the device usually has graphical problems (such as things being drawn more slowly). Why's this?
I have that problem as well, when I use a device size larger than 800x600 the device usually has graphical problems (such as things being drawn more slowly). Why's this?
Proud member of the Online Campaign for Real English. If you believe in capital letters, correct spelling and good sentence structure then copy this into your signature.