Jump to content

Recommended Posts

Posted

I have several questions about working with GUI's.  First question:

How do I switch from focusing on a PLay.gui object (whether it be a button control, a bitmap control or some other control) to the gameworld.  whether by mouse or keyboard.

As of now, when I load an mission.  my mouse commands area affecting the game world and not the play.gui interface.  (BTW,  the mainmenu.gui works well.)

Posted

Hi , bsisko ,

Im not sure that I understand but if you have torque 3d documentation 3.5.1  (i think that it could also referred to as torque3d pdf) . you might look at

GUIcanvas:: stuff starts at p 386 in the pdf .

i got the one i use from readthedocs .

  • 1 month later...
Posted (edited)

You can push and pop a GUI/dialog on top of each other. That enables the mouse cursor automatically.

There are also commands that show or hide the cursor: 

showCursor();

hideCursor();

if you want to interact with a custom GUI in game, then you would have to create the GUI and then push it on top of the Canvas like this:

new GuiChunkedBitmapCtrl(myTempGuiDlg) 
{
   bitmap = ""; //Add bitmap file path here...
   useVariable = "0";
   tile = "0";
   position = "0 0";
   extent = "1920 1080";
   minExtent = "8 8";
   horizSizing = "width";
   vertSizing = "height";
   profile = "GuiContentProfile";
   visible = "1";
   active = "1";
   tooltipProfile = "GuiToolTipProfile";
   hovertime = "1000";
   isContainer = "1";
   canSave = "1";
   canSaveDynamicFields = "1";
   Enabled = "1";

};

Canvas.pushDialog(myTempGuiDlg);

//Canvas.popDialog(myTempGuiDlg); //Use this to close the dialog.

 

Edited by LoLJester

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...