Clickable text
by Tim Doty · in Torque Game Builder · 04/09/2006 (11:00 am) · 1 replies
I'm still trying to come to terms with the GUI objects in T2D so please bear with me. I want to create a popup menu when the user right clicks. Although I eventually got somewhere, sort of, with the MenuBar object that isn't really what I'm after -- that is geared to having permanent menus.
What I settled on was using a GuiWindowCtrl with none of the gadgets (not closable, resizable, etc.), just the title bar and the body. That works fine, but I'm having an issue with the elements. If I use GuiButtonCtrl then it works like I want (click a listing to execute a function), but there is a mandatory border for the text which is ugly.
I've tried setting it to the GuiText profile, but the result is the same.
Likewise I've tried creating the items as GuiTextCtrl which looks right, but they aren't clickable (even though you can associate a command I haven't found a way to trigger it), even with setting the GuiButton profile.
I'm hoping someone can shed some light on where I'm going wrong.
Tim Doty
What I settled on was using a GuiWindowCtrl with none of the gadgets (not closable, resizable, etc.), just the title bar and the body. That works fine, but I'm having an issue with the elements. If I use GuiButtonCtrl then it works like I want (click a listing to execute a function), but there is a mandatory border for the text which is ugly.
I've tried setting it to the GuiText profile, but the result is the same.
Likewise I've tried creating the items as GuiTextCtrl which looks right, but they aren't clickable (even though you can associate a command I haven't found a way to trigger it), even with setting the GuiButton profile.
I'm hoping someone can shed some light on where I'm going wrong.
Tim Doty
About the author
Torque Owner Tim Doty
// global exec("./onStartup.cs"); exec("./sgomHexes.cs"); addGuiProfiles(); // client exec("./client/initClient.cs"); exec("./client/clientCommands.cs"); // server exec("./server/initServer.cs"); exec("./server/serverCommands.cs"); // gui exec("SGoM/gui/sgomScreen.gui"); exec("SGoM/gui/sgomBoardScreen.gui");edit: forgot to copy the gui section of the exec.cs file into the example...