-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathProject Manager.bb
More file actions
600 lines (485 loc) · 18.1 KB
/
Project Manager.bb
File metadata and controls
600 lines (485 loc) · 18.1 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
Strict
;Include Modules
Include "Modules\Framework\RCCEApp.bb"
Include "Modules\F-UI.bb"
Include "Modules\Project Manager\Variables.bb"
Include "Modules\Project Manager\Types.bb"
Include "Modules\Project Manager\Functions.bb"
Include "Modules\IO\Image.bb"
Include "Modules\IO\File.bb"
Include "Modules\Graphics\UI\Components\Component.bb"
Include "Modules\Graphics\UI\Components\ImageComponent.bb"
Include "Modules\Graphics\UI\Components\TextComponent.bb"
Include "Modules\Graphics\UI\Components\MenuItemComponent.bb"
Include "Modules\Graphics\RCCEGraphics.bb"
Include "Modules\Framework\Project\Project.bb"
Include "Modules\Project Manager\RecentProjects.bb"
Type ProjectManager.RCCEApp
Field window%
Field assetList.BBList
Field componentList.BBList
Field splashComponent.ImageComponent
Field gfx.RCCEGraphics
Field prj.Project
Field recentProjectFile.File
Field recentProjectList.BBList
; Need to be able to combine all components into a single list
Field menuItemList.BBList
Method create.ProjectManager()
self = Recast.ProjectManager(RCCEApp::create(self, "RealmCrafter: Community Edition", ".\"))
return self
End Method
Method init()
If FileType(self\rootDir + "res") <> 2
self\rootDir = "..\"
End If
RCCEApp::init(self, 560, 310)
self\gfx = new RCCEGraphics(self\width, self\height, 0, 2)
RCCEGraphics::init(self\gfx)
ProjectManager::showSplash(self)
ProjectManager::loadRecentProjects(self)
ProjectManager::loadProject(self)
FUI_Initialise(self\width, self\height, 0, 2, False, True, self\title, RCCEApp::version(self))
RCCEGraphics::resetBuffer(self\gfx)
self\window = FUI_Window(0, 0, self\width, self\height, "", "", 0, 0)
ProjectManager::loadAssets(self)
ProjectManager::loadComponents(self)
End Method
Method showSplash()
if (self\splashComponent = Null)
Local img.Image = new Image(self\rootDir + "res\Logo_Splash.bmp")
self\splashComponent = new ImageComponent(img)
end if
ImageComponent::resize(self\splashComponent, self\width, self\height)
ImageComponent::place(self\splashComponent, 0, 0)
ImageComponent::draw(self\splashComponent)
Local loadingText.TextComponent = new TextComponent("Loading default project", True)
TextComponent::place(loadingText, (self\splashComponent\scale\x / 2), 200)
TextComponent::setColor(loadingText, 255,255,255)
TextComponent::draw(loadingText)
RCCEGraphics::push(self\gfx)
Image::unload(self\splashComponent\img)
End Method
Method loadAssets()
self\assetList = CreateList()
ListAdd(self\assetList, new Image(self\rootDir + "res\RCCE Banner.jpg"))
ListAdd(self\assetList, new Image(self\rootDir + "res\Gajatix.jpg"))
End Method
Method getImage.BBImage(index%)
local img.Image = ListAt(self\assetList, index)
return img\img
End Method
Method loadComponents()
ProjectManager::addComponent(self, new ImageComponent(ListAt(self\assetList, 0)))
ProjectManager::addComponent(self, new ImageComponent(ListAt(self\assetList, 1)))
;Resize Images
ImageComponent::resize(Recast.ImageComponent(ProjectManager::getComponent(self, 0)), 380, 112)
ImageComponent::resize(Recast.ImageComponent(ProjectManager::getComponent(self, 1)), 100, 67)
End Method
Method addComponent(comp.Component)
if self\componentList = Null
self\componentList = CreateList()
end if
ListAdd(self\componentList, comp)
End Method
Method getComponent.Component(index%)
local comp.Component = ListAt(self\componentList, index)
return comp
End Method
Method getProject.Project(dir$)
Local count = ListSize(self\recentProjectList) - 1
for i = 0 to count
Local prj.Project = ListAt(self\recentProjectList, i)
if (NormalizeProjectRoot$(prj\rootDir) = NormalizeProjectRoot$(dir))
return prj
end if
next
return new Project(dir)
End Method
Method loadProject(prj.Project=Null)
ProjectManager::showSplash(self)
if (prj = Null)
if ((NOT self\recentProjectList = Null) AND ListSize(self\recentProjectList) > 0)
prj = ListAt(self\recentProjectList, 0)
else
prj = new Project(self\rootDir)
end if
end if
if (NOT Project::verify(prj))
if (NOT self\window = 0)
FUI_CustomMessageBox("The selected directory does not contain a valid project.", "Error", MB_OK)
else
RuntimeError("Unable to start Project Manager. No valid project directories in recent.dat")
end if
return
end if
if self\recentProjectList = Null
self\recentProjectList = CreateList()
end if
if (NOT self\prj = Null) Then RecentProjectsPromote(self\recentProjectList, self\prj)
Project::load(prj)
self\prj = prj
RecentProjectsRemoveByRootDir(self\recentProjectList, self\prj\rootDir)
RecentProjectsTrim(self\recentProjectList, 9)
ProjectManager::saveRecentProjects(self)
; Backwards compatibility
if (NOT M_ProjectsRecent = 0) ProjectManager::buildRecentProjectMenu(self)
if (NOT ProName = 0) FUI_SendMessage(ProName, M_SETCAPTION, self\prj\name)
if (NOT GDIR = 0) FUI_SendMessage(GDIR, M_SETTEXT, self\prj\rootDir)
End Method
Method loadRecentProjects()
if (self\recentProjectList = Null)
self\recentProjectList = CreateList()
else
ListClear(self\recentProjectList)
end if
if (self\recentProjectFile = Null)
self\recentProjectFile = FileSystem::safeGetFile(Null, self\rootDir + "res\Recent.dat")
end if
for i = 0 to 9
Local dir$ = File::readLine(self\recentProjectFile)
if (dir$ = "") Then Exit
Local prj.Project = new Project(dir$)
if (NOT Project::verify(prj))
delete prj
else
ListAdd(self\recentProjectList, prj)
end if
if (File::isEnd(self\recentProjectFile)) Then Exit
next
File::close(self\recentProjectFile)
End Method
Method saveRecentProjects()
if (self\recentProjectFile = Null)
self\recentProjectFile = FileSystem::safeGetFile(Null, self\rootDir + "res\Recent.dat")
end if
File::writeLine(self\recentProjectFile, self\prj\rootDir)
Local count = ListSize(self\recentProjectList) - 1
for i = 0 to count
Local prj.Project = ListAt(self\recentProjectList, i)
File::writeLine(self\recentProjectFile, prj\rootDir)
next
File::close(self\recentProjectFile)
End Method
; Needs to be redone properly
; Builds the old menu with the new list
Method buildRecentProjectMenu()
if (self\menuItemList = Null)
self\menuItemList = CreateList()
end if
Local listCount = ListSize(self\recentProjectList) - 1
for i = 0 to listCount
Local prj.Project = ListAt(self\recentProjectList, i)
if (i < ListSize(self\menuItemList))
Local comp.MenuItemComponent = ListAt(self\menuItemList, i)
MenuItemComponent::setText(comp, prj\rootDir)
else
ListAdd(self\menuItemList, new MenuItemComponent(M_ProjectsRecent, prj\rootDir))
end if
next
End Method
End Type
local pm.ProjectManager = new ProjectManager()
ProjectManager::init(pm)
; Backwards compatibility
Global Version$ = RCCEApp::version(pm)
Global LogMode = pm\debug
Global GUE_width = pm\width
Global GUE_height = pm\height
Global RootDir$ = pm\rootDir
;Images
local LogoTex.BBImage = ProjectManager::getImage(pm, 0)
local LogoTex2.BBImage = ProjectManager::getImage(pm, 1)
;Folders
local OMF$ = "Data\Meshes"
local OTF$ = "Data\Textures"
local OSF$ = "Data\Sounds"
local OMuF$ = "Data\Music"
local OSC$ = "Data\Server Data\Scripts"
;Executables
local SCT$ = RootDir$ + "bin\tools\Script Crafters Workshop\Script Crafters Workshop.exe"
local RSW$ = RootDir$ + "bin\tools\RC Spell Wizard\RC Spell Wizard.exe"
local PMH$ = RootDir$ + "res\Help.txt"
local SWH$ = RootDir$ + "bin\tools\RC Spell Wizard\RC Spell Wizard Documentation.pdf"
local GUE$ = RootDir$ + "bin\GUE.exe"
local CLI$ = RootDir$ + "bin\Client.exe"
local SER$ = RootDir$ + "bin\Server.exe"
local LCL$ = "Data\Logs\Client Log.txt"
local LSL$ = "Data\Logs\Server Log.txt"
local SRP$ = RootDir$ + "bin\tools\RC Scriptorama\RC Scriptorama.exe"
local FNT$ = RootDir$ + "bin\tools\FontGen\Font Generator.exe"
local GUB$ = RootDir$ + "bin\tools\Gubbin Tool.exe"
local ARC$ = RootDir$ + "bin\tools\RC Architect.exe"
local CAV$ = RootDir$ + "bin\tools\RC Caves Editor.exe"
local ROC$ = RootDir$ + "bin\tools\RC Rock Editor.exe"
local TER$ = RootDir$ + "bin\tools\RC Terrain Editor.exe"
local TRE$ = RootDir$ + "bin\tools\RC Tree Editor.exe"
local B3D$ = RootDir$ + "compiler\BlitzForge\BlitzRC.exe"
;Main Window
local WMain = pm\window
;Title Menu Bar
;Projects Tab
local M_Projects = FUI_MenuTitle(WMain, "Projects")
local M_ProjectsNew = FUI_MenuItem(M_Projects, "New Project")
local M_ProjectsOpen = FUI_MenuItem(M_Projects, "Open Project")
Global M_ProjectsRecent = FUI_MenuItem(M_Projects, "Recent Projects")
ProjectManager::buildRecentProjectMenu(pm)
;Set Project
;setProject(GameDir$)
;Folders Tab
local M_PFol = FUI_MenuTitle(WMain, "Project Folders")
local M_Meshes = FUI_MenuItem(M_PFol, "Meshes")
local M_textures = FUI_MenuItem(M_PFol, "Textures")
local M_Sounds = FUI_MenuItem(M_PFol, "Sound")
local M_Music = FUI_MenuItem(M_PFol, "Music")
;Wizards Tab
local M_CTol = FUI_MenuTitle(WMain, "3rd Party")
local M_SC = FUI_MenuItem(M_CTol, "Script Crafter")
local M_SW = FUI_MenuItem(M_CTol, "Spell Wizard")
;Help Tab
local M_Help = FUI_MenuTitle(WMain, "Help")
local M_SWH = FUI_MenuItem(M_Help, "Spell Wizard Help")
local M_HF = FUI_MenuItem(M_Help, "Help File")
;Function Buttons
; Buttons disabled; preserve the global symbols so the (dead) Case BMINI /
; Case BCLOSE branches below still compile under Strict mode. Both will
; remain 0, so the Cases never match a real gadget event.
Global BMINI = 0
Global BCLOSE = 0
;BMINI = FUI_Button(WMain, 509, 1, 18, 18, "_")
;BCLOSE = FUI_Button(WMain, 529, 1, 18, 18, "X")
FUI_Label(WMain, GUE_width - 7, 22, Version$, ALIGN_RIGHT)
Global GDIR = FUI_Label(WMain, GUE_width - 7, GUE_height - 20, GameDir$, ALIGN_RIGHT)
;Tabs
local TabMain = FUI_Tab(WMain, 0, 20, GUE_width, GUE_height - 20 - 20)
Global TProject = FUI_TabPage(TabMain, "Project")
Global TEngine = FUI_TabPage(TabMain, "Engine")
Global TSupport = FUI_TabPage(TabMain, "Support")
;Project Tab
;Global Project Properties
;Game Name
FUI_Label(TProject, 160 + 75, 32, "Project Name: ", ALIGN_RIGHT)
Global ProName = FUI_TextBox(TProject, 160 + 75, 27, 380 - 75, 25)
;Buttons
local LET = FUI_GroupBox(TProject, 5, 20, 150, 120, "Game")
local BCLI = FUI_Button(TProject, 15, 40, 62.5, 40, "Client")
local BSER = FUI_Button(TProject, 82.5, 40, 62.5, 40, "Server")
local BOPU = FUI_Button(TProject, 15, 85, 130, 45, "Publish")
local LLG = FUI_GroupBox(TProject, 5, 140, 150, 100, "Logs")
local BLC = FUI_Button(TProject, 15, 165, 130, 25, "Client Log")
local BLS = FUI_Button(TProject, 15, 200, 130, 25, "Server Log")
local LPF = FUI_GroupBox(TProject, 160, 140, 240, 100, "Project Folders")
local BOPF = FUI_Button(TProject, 170, 165, 70.5, 25, "Project")
local BOM = FUI_Button(TProject, 170, 200, 70.5, 25, "Meshes")
local BOT = FUI_Button(TProject, 170 + 75.5, 165, 70.5, 25, "Textures")
local BOS = FUI_Button(TProject, 170 + 75.5, 200, 70.5, 25, "Sound")
local BOSM = FUI_Button(TProject, 170 + 75.5 + 75.5, 165, 70.5, 25, "Music")
local BOSC = FUI_Button(TProject, 170 + 75.5 + 75.5, 200, 70.5, 25, "Scripts")
;Engine Tab
;Logo
FUI_ImageBox(TEngine, 160, 27, 380, 112, Ptr LogoTex)
;Editors
local LED = FUI_GroupBox(TEngine, 5, 20, 150, 80, "Editors")
local BGUE = FUI_Button(TEngine, 15, 40, 130, 50, "Game Unified Editor")
local LTK = FUI_GroupBox(TEngine, 160, 140, 240, 100, "Tool Kit")
local TOOL1 = FUI_Button(TEngine, 170, 165, 70.5, 25, "Gubbin")
local TOOL2 = FUI_Button(TEngine, 170, 200, 70.5, 25, "Architect")
local TOOL3 = FUI_Button(TEngine, 170 + 75.5, 165, 70.5, 25, "Caves")
local TOOL4 = FUI_Button(TEngine, 170 + 75.5, 200, 70.5, 25, "Rock")
local TOOL5 = FUI_Button(TEngine, 170 + 75.5 + 75.5, 165, 70.5, 25, "Terrain")
local TOOL6 = FUI_Button(TEngine, 170 + 75.5 + 75.5, 200, 70.5, 25, "Tree")
;Source
local ST = FUI_GroupBox(TEngine, 405, 140, 135, 100, "Source Tools")
local BB3D = FUI_Button(TEngine, 410, 165, 125, 25, "BlitzForge")
if FileType(B3D$) = 0
FUI_DisableGadget(BB3D)
EndIf
;Support Tab
;Logo
FUI_ImageBox(TSupport, 440, 173, 100, 67, Ptr LogoTex2)
;Buttons
local LFRMS = FUI_GroupBox(TSupport, 5, 20, 150, 220, "Forum Links")
local OBEC = FUI_Button(TSupport, 15, 40, 130, 25, "General")
local ODIS = FUI_Button(TSupport, 15, 73, 130, 25, "Discussion & Help")
local OSCR = FUI_Button(TSupport, 15, 106, 130, 25, "Scripting Discussion")
local OTUT = FUI_Button(TSupport, 15, 139, 130, 25, "Tutorials")
local OSRD = FUI_Button(TSupport, 15, 172, 130, 25, "Source Discussion")
local OSTU = FUI_Button(TSupport, 15, 205, 130, 25, "Showcase")
local LFRM = FUI_GroupBox(TSupport, 160, 110, 380, 55, "RCCE Websites")
local ORYD = FUI_Button(TSupport, 175, 130, 110, 25, "RCCE Source")
local OFRM = FUI_Button(TSupport, 295, 130, 110, 25, "RCCE Forum")
local OWIK = FUI_Button(TSupport, 415, 130, 110, 25, "RCCE Wiki")
local LADD = FUI_GroupBox(TSupport, 160, 166, 275, 74, "Addtional Support")
;Buttons
local BANO = FUI_Button(TSupport, 170, 180, 125, 25, "RCCE Updates")
local BFANO = FUI_Button(TSupport, 170 + 130, 180, 125, 25, "Forum Annoucements")
local DISC = FUI_Button(TSupport, 170, 210, 125, 25, "RCCE Discord")
FUI_Label(TSupport, 160, 25, "The RealmCrafter: Community Edition is a community driven project.")
FUI_Label(TSupport, 160, 60, "You can request to become a contributor by visiting the following link:")
FUI_Label(TSupport, 160, 75, "https://github.com/orgs/RydeTec/teams/rcce-contributors")
; Setup dynamic values
FUI_SendMessage(ProName, M_SETCAPTION, GameName$)
;Finish up before loop
local DeltaTime = MilliSecs()
FUI_HideMouse()
;Start Loop
Repeat
Cls
FUI_Update()
Flip(0)
;Activate Buttons
Local E.Event
For E.Event = Each Event
Select E\EventID
;Main Window
Case BMINI
FUI_MinimiseApp
Case BCLOSE
app\Quit = True
Case ProName
; Atomic rewrite: previous direct-WriteFile truncated and
; started writing immediately, so any crash between WriteFile
; and CloseFile (operator clicks Quit, AV scan, disk full)
; left the project's core metadata file with whatever bytes
; had landed -- typically empty. Write to .tmp, then on
; success demote current Misc.dat to .bak and swap in.
local MiscFinal$ = "Data\Game Data\Misc.dat"
local MiscTemp$ = MiscFinal + ".tmp"
local F.BBStream = WriteFile(MiscTemp)
If F = Null Then RuntimeError("Could not open " + MiscTemp + " for write")
WriteLine F, FUI_SendMessage(ProName, M_GETCAPTION)
WriteLine F, UpdateGame$
WriteLine F, UpdateMusic
CloseFile(F)
If FileSize(MiscTemp) > 0
If FileType(MiscFinal) = 1
If FileType(MiscFinal + ".bak") = 1 Then DeleteFile(MiscFinal + ".bak")
CopyFile(MiscFinal, MiscFinal + ".bak")
DeleteFile(MiscFinal)
EndIf
CopyFile(MiscTemp, MiscFinal)
DeleteFile(MiscTemp)
Else
DeleteFile(MiscTemp)
EndIf
Case M_Meshes
ExecFile(OMF$)
Case M_Textures
ExecFile(OTF$)
Case M_Sounds
ExecFile(OSF$)
Case M_Music
ExecFile(OMuF$)
Case M_SC
ExecFile(SCT$, "", GameDir$)
FUI_MinimiseApp ; Necessary as FUI seems to freeze when the SCT is opened, this is a temporary fix
Case M_SW
ExecFile(RSW$, "", GameDir$)
Case M_SWH
ExecFile(dq(SWH$))
Case M_HF
ExecFile(dq(PMH$))
;Projects Tab
case M_ProjectsNew
If FileType(RootDir$ + "projects") <> 2
CreateDir(RootDir$ + "projects")
EndIf
If FUI_CustomOpenDialog("Project Directory", RootDir$ + "projects", "Project Folder|\\", False, True)
Filesystem::copyTree(Null, RootDir$ + "Data", app\currentFile + "Data")
ProjectManager::loadProject(pm, ProjectManager::getProject(pm, app\currentFile))
;setProject(app\currentFile)
EndIf
case M_ProjectsOpen
If FileType(RootDir$ + "projects") <> 2
CreateDir(RootDir$ + "projects")
EndIf
If FUI_CustomOpenDialog("Project Directory", RootDir$ + "projects", "Project Folder|\\", False, True)
ProjectManager::loadProject(pm, ProjectManager::getProject(pm, app\currentFile))
;setProject(app\currentFile)
EndIf
;Project Tab
Case BGUE
ExecFile(GUE$, "", GameDir$ + "Data\")
Case BCLI
ExecFile(CLI$, "", GameDir$ + "Data\")
Case BSER
ExecFile(SER$, "", GameDir$ + "Data\")
Case BOPU
GenerateFullInstall()
GenerateServer()
Case BOPF
ExecFile(dq(GameDir$))
Case BOM
ExecFile(OMF$)
Case BOT
ExecFile(OTF$)
Case BOS
ExecFile(OSF$)
Case BOSM
ExecFile(OMuF$)
Case BOSC
ExecFile(dq(OSC$))
Case BLC
ExecFile(dq(LCL$))
Case BLS
ExecFile(dq(LSL$))
Case TOOL1
ExecFile(GUB$, "", GameDir$ + "Data\Game Data\")
Case TOOL2
ExecFile(ARC$, "", GameDir$ + "Data\Game Data\")
Case TOOL3
ExecFile(CAV$, "", GameDir$ + "Data\Game Data\")
Case TOOL4
ExecFile(ROC$, "", GameDir$ + "Data\Game Data\")
Case TOOL5
ExecFile(TER$, "", GameDir$ + "Data\Game Data\")
Case TOOL6
ExecFile(TRE$, "", GameDir$ + "Data\Game Data\")
Case BB3D
ExecFile(dq(B3D$))
Case BANO
ExecFile("https://github.com/RydeTec/rcce2/releases")
Case BFANO
ExecFile("https://realmcrafter.boards.net/board/1/announcements")
;Support Tab
Case OBEC
ExecFile("https://realmcrafter.boards.net/board/11/general")
Case ODIS
ExecFile("https://realmcrafter.boards.net/board/4/help")
Case OSCR
ExecFile("https://realmcrafter.boards.net/board/14/scripts")
Case OTUT
ExecFile("https://realmcrafter.boards.net/board/5/tutorials")
Case OSRD
ExecFile("https://realmcrafter.boards.net/board/7/source")
Case OSTU
ExecFile("https://realmcrafter.boards.net/board/9/showcase")
Case ORYD
ExecFile("https://github.com/RydeTec/rcce2")
Case OFRM
ExecFile("https://realmcrafter.boards.net/")
Case OWIK
ExecFile("https://realmcrafter.fandom.com/wiki/RealmCrafter_Wiki")
Case DISC
; Break up discord link so it can't be parsed by bots and spammed
Local disc1$ = "https://disco"
Local disc3$ = "NHKzB"
Local disc2$ = "rd.gg/"
Local disc4$ = "9rdgA"
Local discFull$ = disc1$ + disc2$ + disc3$ + disc4$
ExecFile(discFull$)
End Select
if E <> Null
local mi.MenuItem = Object.MenuItem(E\EventID)
if mi <> Null
if Handle( mi\Parent ) = M_ProjectsRecent
ProjectManager::loadProject(pm, ProjectManager::getProject(pm, mi\caption$))
;setProject(mi\caption$)
EndIf
EndIf
EndIf
Delete E
Next
Until app\Quit = True
FUI_Destroy()
End