⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 consoledlg.gui

📁 此为游戏源码 是很好 的学习工具阿
💻 GUI
字号:
//--- OBJECT WRITE BEGIN ---
new GuiControl(ConsoleDlg) {
   profile = "GuiDefaultProfile";
   
   new GuiWindowCtrl()
   {
      profile = "GuiWindowProfile";
      position = "0 0";
      extent = "640 370";
      text = "Console";
      
      new GuiScrollCtrl()
      {
         profile = "GuiScrollProfile";
         position = "0 0";
         extent = "640 350";
         hScrollBar = "alwaysOn";
         vScrollBar = "alwaysOn";
         horizSizing = "width";
         vertSizing = "height";
      
         new GuiConsole("testArrayCtrl")
         {
            profile = "GuiConsoleProfile";
            position = "0 0";
         };
      };
      
      new GuiConsoleEditCtrl("ConsoleEntry")
      {
         profile = "GuiTextEditProfile";
         position = "0 350";
         extent = "640 20";
         historySize = 20;
         altCommand = "ConsoleEntry::eval();";
         horizSizing = "width";
         vertSizing = "top";
      };
   };
};
//--- OBJECT WRITE END ---

$ConsoleActive = false;

function ConsoleEntry::eval()
{
   %text = ConsoleEntry.getValue();
   echo("==>" @ %text);
   eval(%text);
   ConsoleEntry.setValue("");
}

function ToggleConsole(%make)
{
   if (%make)
   {
      if ($ConsoleActive)
      {
         if ( $enableDirectInput )
            activateKeyboard();
         Canvas.popDialog(ConsoleDlg);
         $ConsoleActive = false;
      }
      else
      {
         if ( $enableDirectInput )
            deactivateKeyboard();
         Canvas.pushDialog(ConsoleDlg, 99);
         $ConsoleActive = true;
      }
   }
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -