sample2.wdl

来自「3D GameStudio 的Delphi开发包」· WDL 代码 · 共 40 行

WDL
40 行
字号
// Sample2.wdl 
// uses Sample2.DLL, you must compile Sample2.dpr first

plugindir = ".";                     // where to find the dll, this is current directory

include <MsgDialog.wdl>;             // gives us access to the ShowMsg_Var function defined in DLL_Debug

dllfunction FindDirectX;             // use this function, defined in DLL_Library
dllfunction ShowAMessage;            // use this function, defined by you

text DirectX
{
	pos_x = 400;
	pos_y = 200;
	flags = center_x;
	string = "You have DirectX 9, Hit F1 to see a message and Hit ESC to quit";
	strings = 1;
}

var video_screen = 2;   // default to window mode
var video_mode   = 7;   // default to 800x600
var video_depth  = 32;  // default to 32 bit depth  	

function main()
{
  if FindDirectX() < 9
  {
    ShowMsg_Var("DirectX 9 is required to run this program","",mtError,mbOk);        
    sys_exit("");
  }
    
  DirectX.visible = On;
  
  on_f1 = ShowAMessage;
	
  while key_esc == 0
  {
    wait(1);
  }
}

⌨️ 快捷键说明

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