-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfonttool.cxs
78 lines (64 loc) · 1.4 KB
/
fonttool.cxs
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
77
78
'NOTE: To build on Win32 GCC, you need to go to the Makefile (i.e. glfw3/gcc_winnt/Makefile)
'and add -lole32 to the LDLIBS property
Strict
'Config settings
#GLFW_WINDOW_TITLE="Vortex2 Font Tool"
#GLFW_WINDOW_WIDTH=800
#GLFW_WINDOW_HEIGHT=600
#GLFW_WINDOW_RESIZABLE=True
#GLFW_WINDOW_SAMPLES=2
#GLFW_GCC_MSIZE_WINNT="32"
#If HOST = "winnt"
#BINARY_FILES += "*.exe"
#End
'Ensure 32 bit Windows builds
#If HOST = "winnt"
#CC_OPTS="-m32"
#End
'Imports
Import mojo.app
Import mojo.input
Import src_tools.fonttool_gui
Import vortex
Class FontToolApp Extends App Final
Public
Method OnCreate:Int()
'Setup
SetUpdateRate(30)
SetSwapInterval(1)
Seed = Millisecs()
'Init vortex
If Not World.Init() Then EndApp()
Print "Vendor name: " + Graphics.VendorName()
Print "Renderer name: " + Graphics.RendererName()
Print "API version name: " + Graphics.APIVersionName()
Print "Shading version name: " + Graphics.ShadingVersionName()
'Create gui
mGui = New Gui
Return False
End
Method OnUpdate:Int()
'Update world
World.Update()
'Update GUI
Local newFont:Font = mGui.Update(mFont)
If newFont <> Null
If mFont Then mFont.Discard()
mFont = newFont
End
Return False
End
Method OnRender:Int()
'Render world
World.Render()
mGui.Render(mFont)
Return False
End
Private
Field mFont : Font
Field mGui : Gui
End
Function Main:Int()
New FontToolApp()
Return False
End