summaryrefslogtreecommitdiff
path: root/Data/Scripts/EditorApplication.lua
blob: aaa0a5e3b1da861b6a09991b6ea9802cf68b79b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
local json = require "LiteJson.json"
local inspect = require "inspect"
local AssetBrowser = require "./Scripts/Editor/AssetBrowser"
local EditorWindowManager = require "./Scripts/EditorGUI/EditorWindowManager"

local Editor = GameLab.Editor 
local Engine = GameLab.Engine
local Resource = GameLab.Engine.Resource
local Rendering = GameLab.Engine.Rendering 
local Debug = GameLab.Debug
local Window = GameLab.Editor.Window
local GL = GameLab.Engine.GL
local delegate = GameLab.Delegate
local tuple = GameLab.Containers.Tuple

local app = GameLab.Editor.EditorApplication.New()

if app == nil then 
	Debug.LogError("app is nil")
end 

local mainWindow = Window.ContainerWindow.New({400, 400, 800, 500}, Window.EShowMode.MainWindow, {100, 100}, {700, 700}) 
mainWindow:SetTitle("GameLab")
mainWindow:SetIcon("./Data/Icon/GameLab.ico")

app:SetMainWindow(mainWindow.native)
EditorWindowManager.SetMainWindow(mainWindow)

EditorWindowManager.TestGUIWindow()

-- local guiWindow = Window.GUIWindow.New() 
-- guiWindow:SetContainerWindow(mainWindow)
-- guiWindow:SetPosition({0,0, 400, 400})

-- local guiWindow2 = Window.GUIWindow.New() 
-- guiWindow2:SetContainerWindow(mainWindow)
-- guiWindow2:SetPosition({400,0, 400, 400})

local v = GameLab.Engine.Math.Vector4(1,2,3,4)

local c = Engine.Rendering.Color(1,1,1,1)

GL.ClearColor({1,1,1,1})
GL.Clear(GL.EBufferType.ColorBuffer) 

local files = {
	"README.txt",
	"README.txt",
	"README.txt",
	"README.txt",
	"README.txt",
	"README.txt",
	"README.txt",
	"README.txt",
	"README.txt",
}

local imgData = Engine.Resource.LoadImageData("./Resources/Images/brickwall.jpg")

local tex = Engine.Resource.LoadTexture("./Resources/Images/brickwall.jpg")

local request = Engine.Resource.LoadImageDataAsync("./Resources/Images/brickwall.jpg")

local font = Engine.GUI.Font.New("./Resources/Font/msyh.ttc", {512, 512}, 5, 5)
_G["default_font"] =  font 

local v = GameLab.Engine.Math.Vector2(10.002, 2.334)

local t = tuple(1,2,3)

while true do

	app:OnStep()
	app:PullMessage()

end