Attribute VB_Name = "Textures"

Option Explicit

'Textures
Public Texture_2DGrid_8 As Long
Public Texture_2DGrid_16 As Long
Public Texture_2DGrid_32 As Long
Public Texture_2DGrid_64 As Long
Public Texture_2DGrid_128 As Long
Public FontAtlas_LucidaConsole_10 As Long
    Public FontTileWidth As Long
    Public FontTileHeight As Long
Public Texture_Tab As Long
    Public TabTexWidth As Long
Public Texture_ButtonUp As Long
Public Texture_ButtonDown As Long
    Public ButtonTexWidth As Long
    Public ButtonTexHeight As Long

Public Function LoadTexture(Filename As String) As Long
    InsertStringToEngine "Graphics/" & Filename
    LoadTexture = frmMain.DGE.Texture_Load_InSB: RE
End Function

Public Sub Texture_Init()
    'Load textures
    frmMain.DGE.Texture_UseAsDefaultTexture LoadTexture("Editor_DefaultTexture"): RE
    Texture_2DGrid_8 = LoadTexture("Editor_2DGrid_8")
    Texture_2DGrid_16 = LoadTexture("Editor_2DGrid_16")
    Texture_2DGrid_32 = LoadTexture("Editor_2DGrid_32")
    Texture_2DGrid_64 = LoadTexture("Editor_2DGrid_64")
    Texture_2DGrid_128 = LoadTexture("Editor_2DGrid_128")
    FontAtlas_LucidaConsole_10 = LoadTexture("Editor_FontAtlas_LucidaConsole_10")
        FontTileWidth = frmMain.DGE.Texture_GetWidth(FontAtlas_LucidaConsole_10) / 16: RE
        FontTileHeight = frmMain.DGE.Texture_GetHeight(FontAtlas_LucidaConsole_10) / 16: RE
    Texture_Tab = LoadTexture("Editor_Tab")
        TabTexWidth = frmMain.DGE.Texture_GetWidth(Texture_Tab): RE
    Texture_ButtonDown = LoadTexture("Editor_ButtonDown")
    Texture_ButtonUp = LoadTexture("Editor_ButtonUp")
        ButtonTexWidth = frmMain.DGE.Texture_GetWidth(Texture_ButtonUp): RE
        ButtonTexHeight = frmMain.DGE.Texture_GetHeight(Texture_ButtonUp): RE
End Sub
