Author Topic: My questions page about making GUIs  (Read 1114 times)

What about If statements and canvas.pop/pushdialog?
Open your favorite text editor, use find and replace and replace ALL "NewspaperGui.gui" with with NewspaperGui
Except this one:
exec("./NewspaperGui.gui");
Then replace
new GuiControl(Newspaper) { with new GuiControl(NewspaperGui) {

Open your favorite text editor, use find and replace and replace ALL "NewspaperGui.gui" with with NewspaperGui
Except this one:
exec("./NewspaperGui.gui");
Then replace
new GuiControl(Newspaper) { with new GuiControl(NewspaperGui) {

Did what you said.

I rekeybound it, pressed the keybind, nothing happened.  I traced it, and the below came up in the console:
Code: [Select]
Entering toggleConsole(1)
   Entering [tmbi]Canvas::pushDialog(Canvas, ConsoleDlg)
      Entering [RTB_Modules_Client_ConnectClient]Canvas::pushDialog(Canvas, ConsoleDlg)
         Entering [CanvasCursor]GuiCanvas::pushDialog(Canvas, ConsoleDlg)
            Entering [CanvasCursor]GuiCanvas::checkCursor(Canvas)
               Entering cursorOn()
               Leaving cursorOn() - return
               Entering [CanvasCursor]GuiCanvas::checkTabFocus(Canvas)
               Leaving [CanvasCursor]GuiCanvas::checkTabFocus() - return
            Leaving [CanvasCursor]GuiCanvas::checkCursor() - return
         Leaving [CanvasCursor]GuiCanvas::pushDialog() - return
         Entering RTBCC_NotificationManager::refocus(RTBCC_NotificationManager)
         Leaving RTBCC_NotificationManager::refocus() - return
      Leaving [RTB_Modules_Client_ConnectClient]Canvas::pushDialog() - return
      Entering tmbi_addtolist(, ConsoleDlg)
      Leaving tmbi_addtolist() - return ConsoleDlg
   Leaving [tmbi]Canvas::pushDialog() - return ConsoleDlg
Leaving toggleConsole() - return ConsoleDlg


Did what you said.

I rekeybound it, pressed the keybind, nothing happened.  I traced it, and the below came up in the console:
Code: [Select]
Entering toggleConsole(1)
   Entering [tmbi]Canvas::pushDialog(Canvas, ConsoleDlg)
      Entering [RTB_Modules_Client_ConnectClient]Canvas::pushDialog(Canvas, ConsoleDlg)
         Entering [CanvasCursor]GuiCanvas::pushDialog(Canvas, ConsoleDlg)
            Entering [CanvasCursor]GuiCanvas::checkCursor(Canvas)
               Entering cursorOn()
               Leaving cursorOn() - return
               Entering [CanvasCursor]GuiCanvas::checkTabFocus(Canvas)
               Leaving [CanvasCursor]GuiCanvas::checkTabFocus() - return
            Leaving [CanvasCursor]GuiCanvas::checkCursor() - return
         Leaving [CanvasCursor]GuiCanvas::pushDialog() - return
         Entering RTBCC_NotificationManager::refocus(RTBCC_NotificationManager)
         Leaving RTBCC_NotificationManager::refocus() - return
      Leaving [RTB_Modules_Client_ConnectClient]Canvas::pushDialog() - return
      Entering tmbi_addtolist(, ConsoleDlg)
      Leaving tmbi_addtolist() - return ConsoleDlg
   Leaving [tmbi]Canvas::pushDialog() - return ConsoleDlg
Leaving toggleConsole() - return ConsoleDlg

That is you opening the console.

Code: [Select]
function Open_NewspaperGui(%toggle)
{
if(%toggle)
{
if(NewspaperGui.isAwake())
{
canvas.popDialog(NewspaperGui);
}

else
{
canvas.pushDialog(NewspaperGui);
}
}
}

Code: [Select]
//Client.cs
exec("./NewspaperGui.gui");

    $remapDivision[$remapCount] = "Blocky999";
    $remapName[$remapCount] = "NewspaperGui";
    $remapCmd[$remapCount] = "Open_NewspaperGui";
    $remapCount++;

and
Open your favorite text editor, use find and replace and replace ALL "NewspaperGui.gui" with with NewspaperGui
Except this one:
exec("./NewspaperGui.gui");
Then replace
new GuiControl(Newspaper) { with new GuiControl(NewspaperGui) {