In-Game Windows and Cursors
by Dustin Witherite · in General Discussion · 03/14/2007 (8:58 pm) · 1 replies
I am working with the starter.fps mod and I apologize if I double posted. I can't remember if I posted this yet or not. I am still learning how to built GUI's and need help with something simple... I think. I have been hacking at this for about two weeks now, and I cannot find anything when searching through the forum which doesn't make sense since this is something that would be useful in RTS.
I found a way to turn the cursor on during gameplay under default.bind.cs:
function toggleCursor(%val)
{
if (%val)
{
if(!Canvas.isCursorOn()) // Check if curson off
{
Canvas.CursorOn(); // Turn on if off
}
else
{
Canvas.CursorOff(); // Turn off if on and return mouse controls
}
}
}
moveMap.bind(keyboard, c, toggleCursor);
***********
Now I used the built in GUI editor to place a guiWindowCTRL into my playGUI.gui interface. When I press the c button my cursor shows up, but I cannot click on or interact with my guiWindowCTRL. My final goal is to have windows for player status, weapon info, stats, etc. Any pointers to get me going again?
Thanks for all who helped so far with the cursor bit.
Dustin
I found a way to turn the cursor on during gameplay under default.bind.cs:
function toggleCursor(%val)
{
if (%val)
{
if(!Canvas.isCursorOn()) // Check if curson off
{
Canvas.CursorOn(); // Turn on if off
}
else
{
Canvas.CursorOff(); // Turn off if on and return mouse controls
}
}
}
moveMap.bind(keyboard, c, toggleCursor);
***********
Now I used the built in GUI editor to place a guiWindowCTRL into my playGUI.gui interface. When I press the c button my cursor shows up, but I cannot click on or interact with my guiWindowCTRL. My final goal is to have windows for player status, weapon info, stats, etc. Any pointers to get me going again?
Thanks for all who helped so far with the cursor bit.
Dustin
Torque Owner Dustin Witherite
Thanks for all the tips guys/gals. :D