📄 mdlmenu.bas
字号:
Attribute VB_Name = "MdlMenu"
Option Explicit
Public BtnNewGame As New clsDxButton
Public BtnExitGame As New clsDxButton
Public BtnSetting As New clsDxButton
Public tTextBox As New clsTextBox
Public Sub Init2DGeometry()
'义犟蝮疣 纛磬
Set BackFon = D3DX.CreateTextureFromFile(D3DDevice, App.Path & "\Data\Images\backfon.bmp")
stBackFon(0) = CreateTLVertex(0, 0, 0, 1, RGB(255, 255, 255), 0, 0, 0)
stBackFon(1) = CreateTLVertex(800, 0, 0, 1, RGB(255, 255, 255), 0, 1, 0)
stBackFon(2) = CreateTLVertex(0, 600, 0, 1, RGB(255, 255, 255), 0, 0, 1)
stBackFon(3) = CreateTLVertex(800, 600, 0, 1, RGB(255, 255, 255), 0, 1, 1)
End Sub
Public Function CreateTLVertex(X As Single, Y As Single, Z As Single, rhw As Single, color As Long, specular As Long, tu As Single, tv As Single) As TLVERTEX
CreateTLVertex.X = X
CreateTLVertex.Y = Y
CreateTLVertex.Z = Z
CreateTLVertex.rhw = rhw
CreateTLVertex.color = color
CreateTLVertex.specular = specular
CreateTLVertex.tu = tu
CreateTLVertex.tv = tv
End Function
Public Sub MainLoop()
'new gam
BtnNewGame.ButtonWidth = 370
BtnNewGame.ButtonHeight = 67
BtnNewGame.ButtonX = 220
BtnNewGame.ButtonY = 220
Set BtnNewGame.SrcSurf = tNewGame
'exit gam
BtnExitGame.ButtonWidth = 210
BtnExitGame.ButtonHeight = 67
BtnExitGame.ButtonX = 295
BtnExitGame.ButtonY = 420
Set BtnExitGame.SrcSurf = tExitGame
'set gam
BtnSetting.ButtonWidth = 340
BtnSetting.ButtonHeight = 67
BtnSetting.ButtonX = 235
BtnSetting.ButtonY = 320
Set BtnSetting.SrcSurf = tSetting
tTextBox.BoxX = 315
tTextBox.BoxY = 225
tTextBox.BoxHieght = 40
tTextBox.BoxWidth = 300
End Sub
Public Sub LoadMainMenuTextures()
'
'义犟蝮疣 觐镪
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -