-
Notifications
You must be signed in to change notification settings - Fork 1
/
editor_main_ui.bas
2820 lines (2359 loc) · 120 KB
/
editor_main_ui.bas
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
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
MAIN_WINDOW_WIDTH = 1280
MAIN_WINDOW_HEIGHT = 800
Dim main_window
Dim Current_Layer
Dim TileSelect_Current_Tileset
Dim TileMain_Current_Tileset
Dim SpriteMain_Current_Sprite
Dim SpriteMain_SpriteAnimation_Current_Animation
Dim SpriteMain_SpriteBound_Current_Frame
Dim top_menu_panel
Dim top_menu_newButton
Dim top_menu_loadButton
Dim top_menu_saveButton
Dim main_tabGroup
Dim main_tabGroup_stageTab
Dim main_tabGroup_tileTab
Dim main_tabGroup_spriteTab
Dim stageInfo_panel
Dim stageInfo_nameLabel
Dim stageInfo_nameField
Dim stageInfo_widthLabel
Dim stageInfo_widthField
Dim stageInfo_heightLabel
Dim stageInfo_heightField
Dim layerInfo_panel
Dim layerInfo_layerLabel[5]
Dim layerInfo_typeSelect[5]
Dim layerInfo_typeSelect_Option[5, 4]
LAYER_TYPE_NULL = 0
LAYER_TYPE_BKG = 1
LAYER_TYPE_TILE = 2
LAYER_TYPE_VIDEO = 3
Dim layerInfo_colDetCheckBox[5]
Dim layerInfo_typeLabel
Dim layerInfo_colDetLabel
Dim info_tabGroup
Dim info_stageTab
Dim info_layerTab
Dim tool_tabGroup
Dim tool_tileTab
Dim tool_bkgTab
Dim tool_actorTab
Dim tool_shapeTab
Dim tileSelect_panel
Dim tileSelect_sheetSelect_Option[4]
Dim tileSelect_sheetSelect
Dim tileSelect_selectedTile_color
Dim tileSelect_tileSheet_Surface
Dim tileSelect_tileSheet_Surface_w
Dim tileSelect_tileSheet_Surface_h
Dim tileSelect_tileSheet_offset_x
Dim tileSelect_tileSheet_offset_y
Dim tileSelect_tileSheet_selected_x
Dim tileSelect_tileSheet_selected_y
Dim tileSelect_tileSheet_selected_index
Dim tileSelect_scroll_speed
Dim background_panel
Dim background_surface
Dim background_surface_w
Dim background_surface_h
Dim background_loadImageButton
Dim background_ClearImageButton
Dim background_setColorButton
Dim background_propertiesButton
Dim actor_panel
Dim actor_listBox
Dim actor_preview_image
Dim actor_preview_w
Dim actor_preview_h
Dim actor_previewClip
Dim actor_addButton
Dim actor_removeButton
Dim actor_propertiesButton
Dim actor_name_label
Dim actor_name_field
Dim actor_positionX_label
Dim actor_positionX_field
Dim actor_positionY_label
Dim actor_positionY_field
Dim actor_layer_label
Dim actor_layer_field
Dim SHAPE_STATE_DRAW_RECT
Dim SHAPE_STATE_DRAW_LINE
Dim SHAPE_STATE_NULL
SHAPE_STATE_NULL = 0
SHAPE_STATE_DRAW_RECT = 1
SHAPE_STATE_DRAW_LINE = 2
Dim Current_Shape
Dim Shape_Current_State
Dim Shape_Current_Point
Dim Shape_Point_X[2]
Dim Shape_Point_Y[2]
Dim shape_panel
Dim shape_listBox
Dim shape_type_label
Dim shape_type_selection
Dim shape_rect
Dim shape_line
Dim shape_positionX_label
Dim shape_positionX_field
Dim shape_positionY_label
Dim shape_positionY_field
Dim shape_parameter1_label
Dim shape_parameter1_field
Dim shape_parameter2_label
Dim shape_parameter2_field
Dim shape_addButton
Dim shape_removeButton
Dim shape_drawButton
Dim stageView_panel
Dim stageView_layerSelection
Dim stageView_layer0
Dim stageView_layer1
Dim stageView_layer2
Dim stageView_layer3
Dim stageView_layer4
Dim stageView_Surface
Dim stageView_Surface_w
Dim stageView_Surface_h
Dim stageView_offset_x
Dim stageView_offset_y
Dim stageView_scroll_speed
Dim stagePos_panel
Dim stagePos_stageCoord_label
Dim stagePos_stageCoord_X_label
Dim stagePos_stageCoord_X_field
Dim stagePos_stageCoord_Y_label
Dim stagePos_stageCoord_Y_field
Dim stagePos_stageCoord_Tile_X_label
Dim stagePos_stageCoord_Tile_X_field
Dim stagePos_stageCoord_Tile_Y_label
Dim stagePos_stageCoord_Tile_Y_field
Dim stagePos_screenCoord_label
Dim stagePos_screenCoord_X_label
Dim stagePos_screenCoord_X_field
Dim stagePos_screenCoord_Y_label
Dim stagePos_screenCoord_Y_field
Dim stagePos_screenCoord_Tile_X_label
Dim stagePos_screenCoord_Tile_X_field
Dim stagePos_screenCoord_Tile_Y_label
Dim stagePos_screenCoord_Tile_Y_field
Dim stagePos_cameraView_label
Dim stagePos_cameraView_X_label
Dim stagePos_cameraView_X_field
Dim stagePos_cameraView_Y_label
Dim stagePos_cameraView_Y_field
Dim stagePos_cameraView_Tile_X_label
Dim stagePos_cameraView_Tile_X_field
Dim stagePos_cameraView_Tile_Y_label
Dim stagePos_cameraView_Tile_Y_field
Dim displaySettings_panel
Dim displaySettings_layer_label[MAX_LAYERS]
Dim displaySettings_layer_main_label
Dim displaySettings_layer_main_checkbox[MAX_LAYERS]
Dim displaySettings_layer_actor_label
Dim displaySettings_layer_actor_checkbox[MAX_LAYERS]
Dim displaySettings_layer_shape_label
Dim displaySettings_layer_shape_checkbox[MAX_LAYERS]
Dim tileMain_panel
Dim tileMain_tileSheetSelection
Dim tileMain_loadButton
Dim tileMain_saveButton
Dim tileMain_tileSheetSurface
Dim tileMain_tileSheetSurface_w
Dim tileMain_tileSheetSurface_h
Dim tileMain_tileSheet_offset_x
Dim tileMain_tileSheet_offset_y
Dim tileMain_tileSheet_selected_index
Dim tileMain_tileSheet_selected_x
Dim tileMain_tileSheet_selected_y
Dim tileMain_frameSlide
Dim tileMain_frameSlide_frame[MAX_TILE_FRAMES]
Dim tileMain_addFrameButton
Dim tileMain_removeFrameButton
Dim tileMain_setFrameButton
Dim tileMain_previewImage
Dim tileMain_previewClip
Dim tileMain_playButton
Dim tileMain_stopButton
Dim tileMain_tileIndexLabel
Dim tileMain_tileIndexField
Dim tileMain_tileFPSLabel
Dim tileMain_tileFPSField
Dim tileMain_frameCountLabel
Dim tileMain_frameCountField
Dim tileMain_animationIsPlaying
Dim sprite_tabGroup
Dim sprite_tabGroup_animationTab
Dim sprite_tabGroup_boundsTab
Dim spriteMain_panel
Dim spriteMain_newButton
Dim spriteMain_saveButton
Dim spriteMain_loadButton
Dim spriteInfo_panel
Dim spriteInfo_nameLabel
Dim spriteInfo_nameField
Dim spriteInfo_frameWidthLabel
Dim spriteInfo_frameWidthField
Dim spriteInfo_frameHeightLabel
Dim spriteInfo_frameHeightField
Dim spriteStageList_panel_y
Dim spriteStageList_panel_h
Dim spriteStageList_panel
Dim spriteStageList_listBox
Dim spriteStageList_addButton
Dim spriteStageList_addFromFileButton
Dim spriteStageList_editButton
Dim spriteStageList_removeButton
Dim spriteAnimation_panel
Dim spriteAnimation_animationListBox
Dim spriteAnimation_newAnimationButton
Dim spriteAnimation_removeAnimationButton
Dim spriteAnimation_spriteSheetSurface
Dim spriteAnimation_spriteSheetSurface_w
Dim spriteAnimation_spriteSheetSurface_h
Dim spriteAnimation_spriteSheetSurface_offset_x
Dim spriteAnimation_spriteSheetSurface_offset_y
Dim spriteAnimation_frameSlide
Dim spriteAnimation_frameSlide_frame[MAX_SPRITE_ANIMATION_FRAMES]
Dim spriteAnimation_addFrameButton
Dim spriteAnimation_removeFrameButton
Dim spriteAnimation_setFrameButton
Dim spriteAnimation_previewImage
Dim spriteAnimation_previewClip
Dim spriteAnimation_previewPlayButton
Dim spriteAnimation_previewStopButton
Dim spriteAnimation_nameLabel
Dim spriteAnimation_nameField
Dim spriteAnimation_FPSLabel
Dim spriteAnimation_FPSField
Dim SPRITEBOUND_VIEW_FRAME
Dim SPRITEBOUND_VIEW_SHEET
SPRITEBOUND_VIEW_SHEET = 0
SPRITEBOUND_VIEW_FRAME = 1
Dim spriteBounds_panel
Dim spriteBounds_spriteSheetSurface
Dim spriteBounds_spriteSheetSurface_view
Dim spriteBounds_spriteSheetSurface_w
Dim spriteBounds_spriteSheetSurface_h
Dim spriteBounds_spriteSheetSurface_offset_x
Dim spriteBounds_spriteSheetSurface_offset_y
Dim spriteBounds_selectedFrame
Dim spriteBounds_indexLabel
Dim spriteBounds_indexField
Dim spriteBounds_shapeLabel
Dim spriteBounds_shapeSelection
Dim spriteBounds_shape_rect
Dim spriteBounds_shape_circle
Dim spriteBounds_boundXLabel
Dim spriteBounds_boundXField
Dim spriteBounds_boundYLabel
Dim spriteBounds_boundYField
Dim spriteBounds_param1Label
Dim spriteBounds_param1Field
Dim spriteBounds_param2Label
Dim spriteBounds_param2Field
Dim spriteBounds_frameViewButton
Dim spriteBounds_sheetViewButton
Dim stage_database_sprite[MAX_SPRITES]
Dim stage_database_count
Dim actor_database_count
Dim actor_database_actor[MAX_ACTORS]
Dim Current_Actor
Dim tile_snap
Function Editor_Main_UI()
main_window = Gui_WindowOpen("n00b Engine", WINDOWPOS_CENTERED, WINDOWPOS_CENTERED, MAIN_WINDOW_WIDTH, MAIN_WINDOW_HEIGHT)
'Top Menu
top_menu_panel = Gui_CreatePanel(MAIN_WINDOW_WIDTH, Int(MAIN_WINDOW_HEIGHT/20))
top_menu_newButton = Gui_CreateButton("New", Int(MAIN_WINDOW_HEIGHT/20)*2, Int(MAIN_WINDOW_HEIGHT/20)-2)
top_menu_loadButton = Gui_CreateButton("Load", Int(MAIN_WINDOW_HEIGHT/20)*2, Int(MAIN_WINDOW_HEIGHT/20)-2)
top_menu_saveButton = Gui_CreateButton("Save", Int(MAIN_WINDOW_HEIGHT/20)*2, Int(MAIN_WINDOW_HEIGHT/20)-2)
Gui_Panel_AddObject(top_menu_panel, top_menu_newButton, 1, 1)
Gui_Panel_AddObject(top_menu_panel, top_menu_loadButton, 2 + (Int(MAIN_WINDOW_HEIGHT/20)*2), 1)
Gui_Panel_AddObject(top_menu_panel, top_menu_saveButton, 1 + (2 + (Int(MAIN_WINDOW_HEIGHT/20)*4)), 1)
Gui_Window_AddPanel(main_window, top_menu_panel, 0, 0)
'Main Tab
main_tabGroup = Gui_CreateTabGroup(Int(MAIN_WINDOW_WIDTH), Int(MAIN_WINDOW_HEIGHT/20))
main_tabGroup_stageTab = Gui_TabGroup_AddTab(main_tabGroup, "Stage")
main_tabGroup_tileTab = Gui_TabGroup_AddTab(main_tabGroup, "Tile")
main_tabGroup_spriteTab = Gui_TabGroup_AddTab(main_tabGroup, "Sprite")
Gui_Window_AddTabGroup(main_window, main_tabGroup, 0, Int(MAIN_WINDOW_HEIGHT/20) + 2)
'Stage Info
TOOL_AREA_Y = Int(MAIN_WINDOW_HEIGHT/20)*2 + 4
TOOL_AREA_HEIGHT = MAIN_WINDOW_HEIGHT - (Int(MAIN_WINDOW_HEIGHT/20)*2 +2)
stageInfo_panel = Gui_CreatePanel(Int(MAIN_WINDOW_WIDTH/4)-2, Int(TOOL_AREA_HEIGHT/3 - 4) - Int(MAIN_WINDOW_HEIGHT/10))
dim txt_w
dim txt_h
GetTextSize(GUI_FONT, "Stage Name:", txt_w, txt_h)
stageInfo_nameLabel = Gui_CreateLabel("Stage Name", GUI_FONT_W * 13, GUI_FONT_H)
Gui_Panel_AddObject(stageInfo_panel, stageInfo_nameLabel, 5, 5)
stageInfo_nameField = Gui_CreateTextField(Int(MAIN_WINDOW_WIDTH/4) - 2 - (5 + GUI_FONT_W*13), GUI_FONT_H)
Gui_Panel_AddObject(stageInfo_panel, stageInfo_nameField, txt_w + 13, 5)
'GetTextSize(GUI_FONT, "Stage Width:", txt_w, txt_h)
stageInfo_widthLabel = Gui_CreateLabel("Stage Width", GUI_FONT_W * 13, GUI_FONT_H)
Gui_Panel_AddObject(stageInfo_panel, stageInfo_widthLabel, 5, 5 + GUI_FONT_H + 2)
stageInfo_widthField = Gui_CreateTextField( GUI_FONT_W * 6, GUI_FONT_H)
Gui_Panel_AddObject(stageInfo_panel, stageInfo_widthField, txt_w + 13, 5 + GUI_FONT_H + 2)
'GetTextSize(GUI_FONT, "Stage Width:", txt_w, txt_h)
stageInfo_heightLabel = Gui_CreateLabel("Stage Height", GUI_FONT_W * 13, GUI_FONT_H)
Gui_Panel_AddObject(stageInfo_panel, stageInfo_heightLabel, 5, 5 + GUI_FONT_H*2 + 4)
stageInfo_heightField = Gui_CreateTextField( GUI_FONT_W * 6, GUI_FONT_H)
Gui_Panel_AddObject(stageInfo_panel, stageInfo_heightField, txt_w + 13, 5 + GUI_FONT_H*2 + 4)
Gui_Window_AddPanel(main_window, stageInfo_panel, 1, TOOL_AREA_Y + Int(MAIN_WINDOW_HEIGHT/20)+2)
'Layer Info
layerInfo_panel = Gui_CreatePanel(Int(MAIN_WINDOW_WIDTH/4)-2, Int(TOOL_AREA_HEIGHT/3 - 4) - Int(MAIN_WINDOW_HEIGHT/10))
layerInfo_typeLabel = Gui_CreateLabel("TYPE", GUI_FONT_W*4, GUI_FONT_H)
Gui_Panel_AddObject(layerInfo_panel, layerInfo_typeLabel, 5 + GUI_FONT_W*12, 5)
layerInfo_colDetLabel = Gui_CreateLabel("COL-DET", GUI_FONT_W*7, GUI_FONT_H)
Gui_Panel_AddObject(layerInfo_panel, layerInfo_colDetLabel, 5 + GUI_FONT_W*12 + Int(MAIN_WINDOW_WIDTH/12) + 10, 5)
For i = 0 to 4
layerInfo_layerLabel[i] = Gui_CreateLabel("Layer " + str(i), GUI_FONT_W * 13, GUI_FONT_H)
Gui_Panel_AddObject(layerInfo_panel, layerInfo_layerLabel[i], 5, 5 + i * (GUI_FONT_H+5) + GUI_FONT_H)
layerInfo_typeSelect[i] = Gui_CreateDropDown(Int(MAIN_WINDOW_WIDTH/12), GUI_FONT_H+2)
layerInfo_typeSelect_Option[i, 0] = Gui_DropDown_AddItem(layerInfo_typeSelect[i], "null")
layerInfo_typeSelect_Option[i, 1] = Gui_DropDown_AddItem(layerInfo_typeSelect[i], "tile")
layerInfo_typeSelect_Option[i, 2] = Gui_DropDown_AddItem(layerInfo_typeSelect[i], "background")
Gui_Panel_AddObject(layerInfo_panel, layerInfo_typeSelect[i], GUI_FONT_W*12, 5 + i * (GUI_FONT_H+5) + GUI_FONT_H)
layerInfo_colDetCheckBox[i] = Gui_CreateCheckBox(GUI_FONT_H, GUI_FONT_H)
Gui_Panel_AddObject(layerInfo_panel, layerInfo_colDetCheckBox[i], 5 + GUI_FONT_W*12 + Int(MAIN_WINDOW_WIDTH/12) + 10, 5 + i * (GUI_FONT_H+5) + GUI_FONT_H)
Next
Gui_Window_AddPanel(main_window, layerInfo_panel, 1, TOOL_AREA_Y + Int(MAIN_WINDOW_HEIGHT/20)+2)
'Info Tab Group
info_tabGroup = Gui_CreateTabGroup(Int(MAIN_WINDOW_WIDTH/4)-2, Int(MAIN_WINDOW_HEIGHT/20))
info_stageTab = Gui_TabGroup_AddTab(info_tabGroup, "Stage Info")
Gui_TabGroup_Tab_AddObject(info_tabGroup, info_stageTab, stageInfo_panel)
info_layerTab = Gui_TabGroup_AddTab(info_tabGroup, "Layer Settings")
Gui_TabGroup_Tab_AddObject(info_tabGroup, info_layerTab, layerInfo_panel)
Gui_Window_AddTabGroup(main_window, info_tabGroup, 1, TOOL_AREA_Y)
'Tool Panels
Tool_TabGroup_Y = TOOL_AREA_Y + Int(MAIN_WINDOW_HEIGHT/20) + ( Int(TOOL_AREA_HEIGHT/3 - 4) - Int(MAIN_WINDOW_HEIGHT/10) ) + 4
'Tool Tab Group
tool_tabGroup = Gui_CreateTabGroup(Int(MAIN_WINDOW_WIDTH/4)-2, Int(MAIN_WINDOW_HEIGHT/20))
tool_tileTab = Gui_TabGroup_AddTab(tool_tabGroup, "Tile")
tool_bkgTab = Gui_TabGroup_AddTab(tool_tabGroup, "Bkg")
tool_actorTab = Gui_TabGroup_AddTab(tool_tabGroup, "Actor")
tool_shapeTab = Gui_TabGroup_AddTab(tool_tabGroup, "Shape")
Gui_Window_AddTabGroup(main_window, tool_tabGroup, 1, Tool_TabGroup_Y)
Tool_Panel_Y = Tool_TabGroup_Y + Int(MAIN_WINDOW_HEIGHT/20) + 2
Tool_Panel_H = MAIN_WINDOW_HEIGHT - Tool_Panel_Y - 4
'---------------Tile Select Panel-------------------------------------------------------
tileSelect_panel = Gui_CreatePanel(Int(MAIN_WINDOW_WIDTH/4)-2, Tool_Panel_H)
Gui_TabGroup_Tab_AddObject(tool_tabGroup, tool_tileTab, tileSelect_panel)
'tilesheet Selection
tileSelect_sheetSelect = Gui_CreateDropDown(Int(MAIN_WINDOW_WIDTH/4)-8, GUI_FONT_H+2)
For i = 0 to MAX_TILESETS-1
Gui_DropDown_AddItem(tileSelect_sheetSelect, "Tileset " + Str$(i))
Next
Gui_Panel_AddObject(tileSelect_panel, tileSelect_sheetSelect, 2, 2)
tileSelect_selectedTile_color = rgb(255, 0, 0)
tileSelect_tileSheet_selected_index = 0
tileSelect_tileSheet_selected_x = 0
tileSelect_tileSheet_selected_y = 0
tileSelect_tileSheet_offset_x = 0
tileSelect_tileSheet_offset_y = 0
tileSelect_scroll_speed = 4
'tilesheet surface
tileSelect_tileSheet_Surface_w = Int(MAIN_WINDOW_WIDTH/4)-8
tileSelect_tileSheet_Surface_h = Tool_Panel_H - (GUI_FONT_H*4)
tileSelect_tileSheet_Surface = Gui_CreateSurface(tileSelect_tileSheet_Surface_w, tileSelect_tileSheet_Surface_h)
Gui_Panel_AddObject(tileSelect_panel, tileSelect_tileSheet_Surface, 2, GUI_FONT_H + 8)
Gui_Window_AddPanel(main_window, tileSelect_panel, 1, Tool_Panel_Y)
'---------------------------------------------------------------------------------------
'-------------Background Panel----------------------------------------------------------
background_panel = Gui_CreatePanel(Int(MAIN_WINDOW_WIDTH/4)-2, Tool_Panel_H)
Gui_TabGroup_Tab_AddObject(tool_tabGroup, tool_bkgTab, background_panel)
background_surface = Gui_CreateSurface(Int(MAIN_WINDOW_WIDTH/4)-8, Int(MAIN_WINDOW_WIDTH/6)-8)
background_surface_w = Int(MAIN_WINDOW_WIDTH/4)-8
background_surface_h = Int(MAIN_WINDOW_WIDTH/6)-8
Gui_Panel_AddObject(background_panel, background_surface, 2, 2)
background_loadImageButton = Gui_CreateButton("Load Image", Int(MAIN_WINDOW_WIDTH/8)-4, GUI_FONT_H*2)
Gui_Panel_AddObject(background_panel, background_loadImageButton, 2, Int(MAIN_WINDOW_WIDTH/6)-4)
background_ClearImageButton = Gui_CreateButton("Clear Image", Int(MAIN_WINDOW_WIDTH/8)-4, GUI_FONT_H*2)
Gui_Panel_AddObject(background_panel, background_ClearImageButton, 2, (Int(MAIN_WINDOW_WIDTH/6)-4) + GUI_FONT_H*2 + 2)
background_setColorButton = Gui_CreateButton("Set Color", Int(MAIN_WINDOW_WIDTH/8)-4, GUI_FONT_H*2)
Gui_Panel_AddObject(background_panel, background_setColorButton, Int(MAIN_WINDOW_WIDTH/8), Int(MAIN_WINDOW_WIDTH/6)-4)
background_propertiesButton = Gui_CreateButton("Properties", Int(MAIN_WINDOW_WIDTH/8)-4, GUI_FONT_H*2)
Gui_Panel_AddObject(background_panel, background_propertiesButton, Int(MAIN_WINDOW_WIDTH/8), (Int(MAIN_WINDOW_WIDTH/6)-4) + GUI_FONT_H*2 + 2)
Gui_Window_AddPanel(main_window, background_panel, 1, Tool_Panel_Y)
'---------------------------------------------------------------------------------------
'-------------Actor Panel----------------------------------------------------------
actor_panel = Gui_CreatePanel(Int(MAIN_WINDOW_WIDTH/4)-2, Tool_Panel_H)
Gui_TabGroup_Tab_AddObject(tool_tabGroup, tool_actorTab, actor_panel)
actor_listBox = Gui_CreateListBox(Int(MAIN_WINDOW_WIDTH/8)-8, Tool_Panel_H/2 - 4)
Gui_Panel_AddObject(actor_panel, actor_listBox, 2, 2)
actor_preview_image = Gui_CreateEmptyImage(Int(MAIN_WINDOW_WIDTH/10), Int(MAIN_WINDOW_WIDTH/10))
actor_preview_w = Int(MAIN_WINDOW_WIDTH/10)
actor_preview_h = Int(MAIN_WINDOW_WIDTH/10)
actor_previewClip = Gui_CreateImageClip(actor_preview_image, actor_preview_w, actor_preview_h, actor_preview_w, actor_preview_h)
Gui_Panel_AddObject(actor_panel, actor_previewClip, Int(MAIN_WINDOW_WIDTH/8)+16, 8)
actor_addButton = Gui_CreateButton("Add Actor", actor_preview_w, GUI_FONT_H+2)
Gui_Panel_AddObject(actor_panel, actor_addButton, Int(MAIN_WINDOW_WIDTH/8)+16, 8 + actor_preview_h + GUI_FONT_H)
actor_removeButton = Gui_CreateButton("Remove Actor", actor_preview_w, GUI_FONT_H+2)
Gui_Panel_AddObject(actor_panel, actor_removeButton, Int(MAIN_WINDOW_WIDTH/8)+16, 8 + actor_preview_h + GUI_FONT_H*2 + 4)
'Properties: visible, solid, col-det
'actor_propertiesButton = Gui_CreateButton("Properties", actor_preview_w, GUI_FONT_H+2)
'Gui_Panel_AddObject(actor_panel, actor_propertiesButton, Int(MAIN_WINDOW_WIDTH/8)+16, 8 + actor_preview_h + GUI_FONT_H*3 + 8)
actor_name_label = Gui_CreateLabel("Name", GUI_FONT_W*4, GUI_FONT_H)
Gui_Panel_AddObject(actor_panel, actor_name_label, 4, Tool_Panel_H/2 + 40)
actor_name_field = Gui_CreateTextField(GUI_FONT_W* 12, GUI_FONT_H+1)
Gui_Panel_AddObject(actor_panel, actor_name_field, GUI_FONT_W*4 + 6, Tool_Panel_H/2 + 40)
actor_positionX_label = Gui_CreateLabel("PosX", GUI_FONT_W*4, GUI_FONT_H)
Gui_Panel_AddObject(actor_panel, actor_positionX_label, 4, Tool_Panel_H/2 + (GUI_FONT_H*2+4) + 40)
actor_positionX_field = Gui_CreateTextField(GUI_FONT_W* 12, GUI_FONT_H+1)
Gui_Panel_AddObject(actor_panel, actor_positionX_field, GUI_FONT_W*4 + 6, Tool_Panel_H/2 + (GUI_FONT_H*2+4) + 40)
actor_positionY_label = Gui_CreateLabel("PosY", GUI_FONT_W*4, GUI_FONT_H)
Gui_Panel_AddObject(actor_panel, actor_positionY_label, 4, Tool_Panel_H/2 + (GUI_FONT_H*3+8) + 40)
actor_positionY_field = Gui_CreateTextField(GUI_FONT_W* 12, GUI_FONT_H+1)
Gui_Panel_AddObject(actor_panel, actor_positionY_field, GUI_FONT_W*4 + 6, Tool_Panel_H/2 + (GUI_FONT_H*3+8) + 40)
actor_layer_label = Gui_CreateLabel("Layer", GUI_FONT_W*6, GUI_FONT_H)
Gui_Panel_AddObject(actor_panel, actor_layer_label, 4, Tool_Panel_H/2 + (GUI_FONT_H*5+8) + 40)
actor_layer_field = Gui_CreateTextField(GUI_FONT_W* 6, GUI_FONT_H+1)
Gui_Panel_AddObject(actor_panel, actor_layer_field, GUI_FONT_W*5 + 6, Tool_Panel_H/2 + (GUI_FONT_H*5+8) + 40)
Gui_Window_AddPanel(main_window, actor_panel, 1, Tool_Panel_Y)
'---------------------------------------------------------------------------------------
'-------------Shape Panel----------------------------------------------------------
shape_panel = Gui_CreatePanel(Int(MAIN_WINDOW_WIDTH/4)-2, Tool_Panel_H)
Gui_TabGroup_Tab_AddObject(tool_tabGroup, tool_shapeTab, shape_panel)
shape_listBox = Gui_CreateListBox(Int(MAIN_WINDOW_WIDTH/8)-8, Tool_Panel_H/2)
Gui_Panel_AddObject(shape_panel, shape_listBox, 2, 2)
shape_type_label = Gui_CreateLabel("Type", GUI_FONT_W*4, GUI_FONT_H)
Gui_Panel_AddObject(shape_panel, shape_type_label, Int(MAIN_WINDOW_WIDTH/8)+4, 4)
shape_type_selection = Gui_CreateDropDown(GUI_FONT_W*14, GUI_FONT_H+2)
Gui_Panel_AddObject(shape_panel, shape_type_selection, Int(MAIN_WINDOW_WIDTH/8) + GUI_FONT_W*4 + 5, 4)
shape_rect = Gui_DropDown_AddItem(shape_type_selection, "Rectangle")
shape_line = Gui_DropDown_AddItem(shape_type_selection, "Line")
shape_positionX_label = Gui_CreateLabel("PosX", GUI_FONT_W*4, GUI_FONT_H)
Gui_Panel_AddObject(shape_panel, shape_positionX_label, Int(MAIN_WINDOW_WIDTH/8)+4, 4 + (GUI_FONT_H+2) + 12)
shape_positionX_field = Gui_CreateTextField(GUI_FONT_W* 10, GUI_FONT_H+1)
Gui_Panel_AddObject(shape_panel, shape_positionX_field, Int(MAIN_WINDOW_WIDTH/8)+4+(GUI_FONT_W*5)+8, 4 + (GUI_FONT_H+2) + 12)
shape_positionY_label = Gui_CreateLabel("PosY", GUI_FONT_W*4, GUI_FONT_H)
Gui_Panel_AddObject(shape_panel, shape_positionY_label, Int(MAIN_WINDOW_WIDTH/8)+4, 4 + (GUI_FONT_H*3+2) + 12)
shape_positionY_field = Gui_CreateTextField(GUI_FONT_W* 10, GUI_FONT_H+1)
Gui_Panel_AddObject(shape_panel, shape_positionY_field, Int(MAIN_WINDOW_WIDTH/8)+4+(GUI_FONT_W*5)+8, 4 + (GUI_FONT_H*3+2) + 12)
shape_parameter1_label = Gui_CreateLabel("Param1", GUI_FONT_W*6, GUI_FONT_H)
Gui_Panel_AddObject(shape_panel, shape_parameter1_label, Int(MAIN_WINDOW_WIDTH/8)+4, 4 + (GUI_FONT_H*5+2) + 12)
shape_parameter1_field = Gui_CreateTextField(GUI_FONT_W* 10, GUI_FONT_H+1)
Gui_Panel_AddObject(shape_panel, shape_parameter1_field, Int(MAIN_WINDOW_WIDTH/8)+4+(GUI_FONT_W*5)+8, 4 + (GUI_FONT_H*5+2) + 12)
shape_parameter2_label = Gui_CreateLabel("Param2", GUI_FONT_W*6, GUI_FONT_H)
Gui_Panel_AddObject(shape_panel, shape_parameter2_label, Int(MAIN_WINDOW_WIDTH/8)+4, 4 + (GUI_FONT_H*7+2) + 12)
shape_parameter2_field = Gui_CreateTextField(GUI_FONT_W* 10, GUI_FONT_H+1)
Gui_Panel_AddObject(shape_panel, shape_parameter2_field, Int(MAIN_WINDOW_WIDTH/8)+4+(GUI_FONT_W*5)+8, 4 + (GUI_FONT_H*7+2) + 12)
shape_addButton = Gui_CreateButton("Add Shape", GUI_FONT_W*16, GUI_FONT_H+2)
Gui_Panel_AddObject(shape_panel, shape_addButton, Int(MAIN_WINDOW_WIDTH/8)+4, 4 + (GUI_FONT_H*9+2) + 12)
shape_removeButton = Gui_CreateButton("Remove Shape", GUI_FONT_W*16, GUI_FONT_H+2)
Gui_Panel_AddObject(shape_panel, shape_removeButton, Int(MAIN_WINDOW_WIDTH/8)+4, 4 + (GUI_FONT_H*11+2) + 12)
Gui_Window_AddPanel(main_window, shape_panel, 1, Tool_Panel_Y)
'---------------------------------------------------------------------------------------
'stage panel
stageView_panel = Gui_CreatePanel(650, 520)
stageView_layerSelection = Gui_CreateDropDown(GUI_FONT_W*16, GUI_FONT_H+2)
Gui_Panel_AddObject(stageView_panel, stageView_layerSelection, 4, 4)
stageView_layer0 = Gui_DropDown_AddItem(stageView_layerSelection, "Layer 0")
stageView_layer1 = Gui_DropDown_AddItem(stageView_layerSelection, "Layer 1")
stageView_layer2 = Gui_DropDown_AddItem(stageView_layerSelection, "Layer 2")
stageView_layer3 = Gui_DropDown_AddItem(stageView_layerSelection, "Layer 3")
stageView_layer4 = Gui_DropDown_AddItem(stageView_layerSelection, "Layer 4")
'stageView_Surface_w = Int(MAIN_WINDOW_WIDTH/4*3)-12
'stageView_Surface_h = TOOL_AREA_HEIGHT-(GUI_FONT_H*2)-16
stageView_Surface_w = 640
stageView_Surface_h = 480
STAGE_SCREEN_WIDTH = stageView_Surface_w
STAGE_SCREEN_HEIGHT = stageView_Surface_h
stageView_scroll_speed = 4
stageView_Surface = Gui_CreateSurface(stageView_Surface_w, stageView_Surface_h)
Gui_Panel_AddObject(stageView_panel, stageView_surface, 2, GUI_FONT_H *2 + 6)
Gui_Window_AddPanel(main_window, stageView_panel, Int(MAIN_WINDOW_WIDTH/4) + 2, TOOL_AREA_Y)
'Stage Position Panel
'Int(MAIN_WINDOW_WIDTH/4) + 2, TOOL_AREA_Y
stagePos_panel = Gui_CreatePanel(650, MAIN_WINDOW_HEIGHT - (TOOL_AREA_Y+526))
stagePos_stageCoord_label = Gui_CreateLabel("STAGE POS", GUI_FONT_W*10, GUI_FONT_H+1)
Gui_Panel_AddObject(stagePos_panel, stagePos_stageCoord_label, 8, 4)
stagePos_stageCoord_X_label = Gui_CreateLabel("Pos X", GUI_FONT_W*6, GUI_FONT_H+1)
Gui_Panel_AddObject(stagePos_panel, stagePos_stageCoord_X_label, 8, 40)
stagePos_stageCoord_X_field = Gui_CreateDynamicTextField(GUI_FONT_W*10, GUI_FONT_H)
Gui_Panel_AddObject(stagePos_panel, stagePos_stageCoord_X_field, 8 + GUI_FONT_W*6 + 4, 40)
stagePos_stageCoord_Y_label = Gui_CreateLabel("Pos Y", GUI_FONT_W*6, GUI_FONT_H+1)
Gui_Panel_AddObject(stagePos_panel, stagePos_stageCoord_Y_label, 8, 40 + GUI_FONT_H+2)
stagePos_stageCoord_Y_field = Gui_CreateDynamicTextField(GUI_FONT_W*10, GUI_FONT_H)
Gui_Panel_AddObject(stagePos_panel, stagePos_stageCoord_Y_field, 8 + GUI_FONT_W*6 + 4, 40 + GUI_FONT_H+2)
stagePos_stageCoord_Tile_X_label = Gui_CreateLabel("Tile X", GUI_FONT_W*6, GUI_FONT_H+1)
Gui_Panel_AddObject(stagePos_panel, stagePos_stageCoord_Tile_X_label, 8, 80)
stagePos_stageCoord_Tile_X_field = Gui_CreateDynamicTextField(GUI_FONT_W*10, GUI_FONT_H)
Gui_Panel_AddObject(stagePos_panel, stagePos_stageCoord_Tile_X_field, 8 + GUI_FONT_W*6 + 4, 80)
stagePos_stageCoord_Tile_Y_label = Gui_CreateLabel("Tile Y", GUI_FONT_W*6, GUI_FONT_H+1)
Gui_Panel_AddObject(stagePos_panel, stagePos_stageCoord_Tile_Y_label, 8, 80 + GUI_FONT_H+2)
stagePos_stageCoord_Tile_Y_field = Gui_CreateDynamicTextField(GUI_FONT_W*10, GUI_FONT_H)
Gui_Panel_AddObject(stagePos_panel, stagePos_stageCoord_Tile_Y_field, 8 + GUI_FONT_W*6 + 4, 80 + GUI_FONT_H+2)
stagePos_screenCoord_label = Gui_CreateLabel("SCREEN POS", GUI_FONT_W*11, GUI_FONT_H+1)
Gui_Panel_AddObject(stagePos_panel, stagePos_screenCoord_label, 8 + GUI_FONT_W*20, 4)
stagePos_screenCoord_X_label = Gui_CreateLabel("Pos X", GUI_FONT_W*6, GUI_FONT_H+1)
Gui_Panel_AddObject(stagePos_panel, stagePos_screenCoord_X_label, 8 + GUI_FONT_W*20, 40)
stagePos_screenCoord_X_field = Gui_CreateDynamicTextField(GUI_FONT_W*10, GUI_FONT_H)
Gui_Panel_AddObject(stagePos_panel, stagePos_screenCoord_X_field, 8 + GUI_FONT_W*20 + GUI_FONT_W*6 + 4, 40)
stagePos_screenCoord_Y_label = Gui_CreateLabel("Pos Y", GUI_FONT_W*6, GUI_FONT_H+1)
Gui_Panel_AddObject(stagePos_panel, stagePos_screenCoord_Y_label, 8 + GUI_FONT_W*20, 40 + GUI_FONT_H+2)
stagePos_screenCoord_Y_field = Gui_CreateDynamicTextField(GUI_FONT_W*10, GUI_FONT_H)
Gui_Panel_AddObject(stagePos_panel, stagePos_screenCoord_Y_field, 8 + GUI_FONT_W*20 + GUI_FONT_W*6 + 4, 40 + GUI_FONT_H+2)
stagePos_screenCoord_Tile_X_label = Gui_CreateLabel("Tile X", GUI_FONT_W*6, GUI_FONT_H+1)
Gui_Panel_AddObject(stagePos_panel, stagePos_screenCoord_Tile_X_label, 8 + GUI_FONT_W*20, 80)
stagePos_screenCoord_Tile_X_field = Gui_CreateDynamicTextField(GUI_FONT_W*10, GUI_FONT_H)
Gui_Panel_AddObject(stagePos_panel, stagePos_screenCoord_Tile_X_field, 8 + GUI_FONT_W*20 + GUI_FONT_W*6 + 4, 80)
stagePos_screenCoord_Tile_Y_label = Gui_CreateLabel("Tile Y", GUI_FONT_W*6, GUI_FONT_H+1)
Gui_Panel_AddObject(stagePos_panel, stagePos_screenCoord_Tile_Y_label, 8 + GUI_FONT_W*20, 80 + GUI_FONT_H+2)
stagePos_screenCoord_Tile_Y_field = Gui_CreateDynamicTextField(GUI_FONT_W*10, GUI_FONT_H)
Gui_Panel_AddObject(stagePos_panel, stagePos_screenCoord_Tile_Y_field, 8 + GUI_FONT_W*20 + GUI_FONT_W*6 + 4, 80 + GUI_FONT_H+2)
stagePos_cameraView_label = Gui_CreateLabel("CAMERA VIEW", GUI_FONT_W*11, GUI_FONT_H+1)
Gui_Panel_AddObject(stagePos_panel, stagePos_cameraView_label, 8 + GUI_FONT_W*40, 4)
stagePos_cameraView_X_label = Gui_CreateLabel("Pos X", GUI_FONT_W*6, GUI_FONT_H+1)
Gui_Panel_AddObject(stagePos_panel, stagePos_cameraView_X_label, 8 + GUI_FONT_W*40, 40)
stagePos_cameraView_X_field = Gui_CreateDynamicTextField(GUI_FONT_W*10, GUI_FONT_H)
Gui_Panel_AddObject(stagePos_panel, stagePos_cameraView_X_field, 8 + GUI_FONT_W*40 + GUI_FONT_W*6 + 4, 40)
stagePos_cameraView_Y_label = Gui_CreateLabel("Pos Y", GUI_FONT_W*6, GUI_FONT_H+1)
Gui_Panel_AddObject(stagePos_panel, stagePos_cameraView_Y_label, 8 + GUI_FONT_W*40, 40 + GUI_FONT_H+2)
stagePos_cameraView_Y_field = Gui_CreateDynamicTextField(GUI_FONT_W*10, GUI_FONT_H)
Gui_Panel_AddObject(stagePos_panel, stagePos_cameraView_Y_field, 8 + GUI_FONT_W*40 + GUI_FONT_W*6 + 4, 40 + GUI_FONT_H+2)
stagePos_cameraView_Tile_X_label = Gui_CreateLabel("Tile X", GUI_FONT_W*6, GUI_FONT_H+1)
Gui_Panel_AddObject(stagePos_panel, stagePos_cameraView_Tile_X_label, 8 + GUI_FONT_W*40, 80)
stagePos_cameraView_Tile_X_field = Gui_CreateDynamicTextField(GUI_FONT_W*10, GUI_FONT_H)
Gui_Panel_AddObject(stagePos_panel, stagePos_cameraView_Tile_X_field, 8 + GUI_FONT_W*40 + GUI_FONT_W*6 + 4, 80)
stagePos_cameraView_Tile_Y_label = Gui_CreateLabel("Tile Y", GUI_FONT_W*6, GUI_FONT_H+1)
Gui_Panel_AddObject(stagePos_panel, stagePos_cameraView_Tile_Y_label, 8 + GUI_FONT_W*40, 80 + GUI_FONT_H+2)
stagePos_cameraView_Tile_Y_field = Gui_CreateDynamicTextField(GUI_FONT_W*10, GUI_FONT_H)
Gui_Panel_AddObject(stagePos_panel, stagePos_cameraView_Tile_Y_field, 8 + GUI_FONT_W*40 + GUI_FONT_W*6 + 4, 80 + GUI_FONT_H+2)
Gui_Window_AddPanel(main_window, stagePos_panel, Int(MAIN_WINDOW_WIDTH/4) + 2, TOOL_AREA_Y + Gui_Panel_H[Gui_Element_Index[stageView_panel]]+2)
'Display Settings
displaySettings_x = Gui_Panel_X[ Gui_Element_Index[stageView_panel]] + Gui_Panel_W[ Gui_Element_Index[stageView_panel]] + 2
displaySettings_y = TOOL_AREA_Y
displaySettings_w = MAIN_WINDOW_WIDTH - displaySettings_x - 2
displaySettings_h = MAIN_WINDOW_HEIGHT - TOOL_AREA_Y - 4
displaySettings_panel = Gui_CreatePanel( displaySettings_w, displaySettings_h)
ds_main_x = GUI_FONT_W*8+4
ds_actor_x = ds_main_x + GUI_FONT_W*8
ds_shape_x = ds_actor_x + GUI_FONT_W*8
ds_title_y = 20
displaySettings_layer_main_label = Gui_CreateLabel("MAIN", GUI_FONT_W*5, GUI_FONT_H+1)
displaySettings_layer_actor_label = Gui_CreateLabel("ACTOR", GUI_FONT_W*6, GUI_FONT_H+1)
displaySettings_layer_shape_label = Gui_CreateLabel("SHAPE", GUI_FONT_W*6, GUI_FONT_H+1)
Gui_Panel_AddObject(displaySettings_panel, displaySettings_layer_main_label, ds_main_x, ds_title_y)
Gui_Panel_AddObject(displaySettings_panel, displaySettings_layer_actor_label, ds_actor_x, ds_title_y)
Gui_Panel_AddObject(displaySettings_panel, displaySettings_layer_shape_label, ds_shape_x, ds_title_y)
For i = 0 to MAX_LAYERS-1
displaySettings_layer_label[i] = Gui_CreateLabel("Layer " + Str(i), GUI_FONT_W*7, GUI_FONT_H+1)
displaySettings_layer_main_checkbox[i] = Gui_CreateCheckBox(GUI_FONT_H+1, GUI_FONT_H+1)
displaySettings_layer_actor_checkbox[i] = Gui_CreateCheckBox(GUI_FONT_H+1, GUI_FONT_H+1)
displaySettings_layer_shape_checkbox[i] = Gui_CreateCheckBox(GUI_FONT_H+1, GUI_FONT_H+1)
y = (ds_title_y+GUI_FONT_H+8) + (i*(GUI_FONT_H+1)) + (i*10)
Gui_Panel_AddObject(displaySettings_panel, displaySettings_layer_label[i], 8, y)
Gui_Panel_AddObject(displaySettings_panel, displaySettings_layer_main_checkbox[i], ds_main_x, y)
Gui_Panel_AddObject(displaySettings_panel, displaySettings_layer_actor_checkbox[i], ds_actor_x, y)
Gui_Panel_AddObject(displaySettings_panel, displaySettings_layer_shape_checkbox[i], ds_shape_x, y)
Gui_CheckBox_SetValue(displaySettings_layer_main_checkbox[i], True)
Gui_CheckBox_SetValue(displaySettings_layer_actor_checkbox[i], True)
Gui_CheckBox_SetValue(displaySettings_layer_shape_checkbox[i], True)
Next
Gui_Window_AddPanel(main_window, displaySettings_panel, displaySettings_x, displaySettings_y)
'Add info_tabGroup, tool_tabGroup, and the stageView_panel to the main_tabGroup_stageTab
Gui_TabGroup_Tab_AddObject(main_tabGroup, main_tabGroup_stageTab, info_tabGroup)
Gui_TabGroup_Tab_AddObject(main_tabGroup, main_tabGroup_stageTab, tool_tabGroup)
Gui_TabGroup_Tab_AddObject(main_tabGroup, main_tabGroup_stageTab, stageView_panel)
Gui_TabGroup_Tab_AddObject(main_tabGroup, main_tabGroup_stageTab, stagePos_panel)
Gui_TabGroup_Tab_AddObject(main_tabGroup, main_tabGroup_stageTab, displaySettings_panel)
'Tile Tab
tileMain_panel = Gui_CreatePanel(MAIN_WINDOW_WIDTH-4, TOOL_AREA_HEIGHT-4)
Gui_Window_AddPanel(main_window, tileMain_panel, 2, TOOL_AREA_Y)
Gui_TabGroup_Tab_AddObject(main_tabGroup, main_tabGroup_tileTab, tileMain_panel)
tileMain_tileSheetSelection = Gui_CreateDropDown(GUI_FONT_W*20, GUI_FONT_H+2)
For i = 0 to MAX_TILESETS-1
Gui_DropDown_AddItem(tileMain_tileSheetSelection, "Tileset " + Str$(i))
Next
Gui_Panel_AddObject(tileMain_panel, tileMain_tileSheetSelection, GUI_FONT_W, GUI_FONT_H)
tileMain_loadButton = Gui_CreateButton("Load TileSet", GUI_FONT_W*18, GUI_FONT_H+8)
Gui_Panel_AddObject(tileMain_panel, tileMain_loadButton, GUI_FONT_W*22, GUI_FONT_H)
tileMain_saveButton = Gui_CreateButton("Save TileSet", GUI_FONT_W*18, GUI_FONT_H+8)
Gui_Panel_AddObject(tileMain_panel, tileMain_saveButton, GUI_FONT_W*40+2, GUI_FONT_H)
tileMain_tileSheetSurface_w = 640
tileMain_tileSheetSurface_h = 480
tileMain_tileSheetSurface = Gui_CreateSurface(tileMain_tileSheetSurface_w, tileMain_tileSheetSurface_h)
Gui_Panel_AddObject(tileMain_panel, tileMain_tileSheetSurface, GUI_FONT_W, GUI_FONT_H*3 + 4)
tileMain_frameSlide = Gui_CreateImageSlide(512, 64, 64, 64)
Gui_Panel_AddObject(tileMain_panel, tileMain_frameSlide, GUI_FONT_W+64, GUI_FONT_H*3 + 500)
For i = 0 to MAX_TILE_FRAMES-1
tileMain_frameSlide_frame[i] = Gui_CreateImageClip(0, 32, 32, 32, 32)
Next
tileMain_addFrameButton = Gui_CreateButton("+",32, 32)
Gui_Panel_AddObject(tileMain_panel, tileMain_addFrameButton, GUI_FONT_W+64, GUI_FONT_H*3 + 566)
tileMain_removeFrameButton = Gui_CreateButton("-",32, 32)
Gui_Panel_AddObject(tileMain_panel, tileMain_removeFrameButton, GUI_FONT_W+98, GUI_FONT_H*3 + 566)
tileMain_setFrameButton = Gui_CreateButton("=",32, 32)
Gui_Panel_AddObject(tileMain_panel, tileMain_setFrameButton, GUI_FONT_W+132, GUI_FONT_H*3 + 566)
tileMain_previewImage = Gui_CreateEmptyImage(128, 128)
tileMain_previewClip = Gui_CreateImageClip(tileMain_previewImage, 128, 128, 128, 128)
Gui_Panel_AddObject(tileMain_panel, tileMain_previewClip, GUI_FONT_W + 640 + GUI_FONT_W*8, GUI_FONT_H*3+4)
tileMain_playButton = Gui_CreateButton("PLAY", 63, 32)
Gui_Panel_AddObject(tileMain_panel, tileMain_playButton, GUI_FONT_W + 640 + GUI_FONT_W*8, GUI_FONT_H*3 + 136)
tileMain_stopButton = Gui_CreateButton("STOP", 63, 32)
Gui_Panel_AddObject(tileMain_panel, tileMain_stopButton, GUI_FONT_W + 640 + GUI_FONT_W*8 + 64, GUI_FONT_H*3 + 136)
tileMain_tileIndexLabel = Gui_CreateLabel("Tile Index", GUI_FONT_W*11, GUI_FONT_H+1)
Gui_Panel_AddObject(tileMain_panel, tileMain_tileIndexLabel, GUI_FONT_W + 640 + GUI_FONT_W*8, 180 + GUI_FONT_H*5)
tileMain_tileIndexField = Gui_CreateTextField(GUI_FONT_W*12, GUI_FONT_H+1)
Gui_Panel_AddObject(tileMain_panel, tileMain_tileIndexField, GUI_FONT_W + 640 + GUI_FONT_W*18, 180 + GUI_FONT_H*5)
tileMain_tileFPSLabel = Gui_CreateLabel("Tile FPS", GUI_FONT_W*11, GUI_FONT_H+1)
Gui_Panel_AddObject(tileMain_panel, tileMain_tileFPSLabel, GUI_FONT_W + 640 + GUI_FONT_W*8, 180 + GUI_FONT_H*6 + 4)
tileMain_tileFPSField = Gui_CreateTextField(GUI_FONT_W*12, GUI_FONT_H+1)
Gui_Panel_AddObject(tileMain_panel, tileMain_tileFPSField, GUI_FONT_W + 640 + GUI_FONT_W*18, 180 + GUI_FONT_H*6 + 4)
tileMain_frameCountLabel = Gui_CreateLabel("Frame Count", GUI_FONT_W*13, GUI_FONT_H+1)
Gui_Panel_AddObject(tileMain_panel, tileMain_frameCountLabel, GUI_FONT_W + 640 + GUI_FONT_W*8, 180 + GUI_FONT_H*7 + 8)
tileMain_frameCountField = Gui_CreateTextField(GUI_FONT_W*12, GUI_FONT_H+1)
Gui_Panel_AddObject(tileMain_panel, tileMain_frameCountField, GUI_FONT_W + 640 + GUI_FONT_W*18, 180 + GUI_FONT_H*7 + 8)
'Sprite Tab
'sprite_tabGroup
sprite_tabGroup = Gui_CreateTabGroup(Int(MAIN_WINDOW_WIDTH/4*3)-6, Int(MAIN_WINDOW_HEIGHT/20))
sprite_tabGroup_animationTab = Gui_TabGroup_AddTab(sprite_tabGroup, "Animations")
sprite_tabGroup_boundsTab = Gui_TabGroup_AddTab(sprite_tabGroup, "Bounds")
Gui_Window_AddTabGroup(main_window, sprite_tabGroup, Int(MAIN_WINDOW_WIDTH/4) + 2, TOOL_AREA_Y)
Gui_TabGroup_Tab_AddObject(main_tabGroup, main_tabGroup_spriteTab, sprite_tabGroup)
'Sprite Control
spriteMain_panel = Gui_CreatePanel(Int(MAIN_WINDOW_WIDTH/4)-2, Int(GUI_FONT_H*2))
spriteMain_newButton = Gui_CreateButton("New Sprite", GUI_FONT_W*12, GUI_FONT_H+2)
Gui_Panel_AddObject(spriteMain_panel, spriteMain_newButton, 4, 4)
spriteMain_saveButton = Gui_CreateButton("Save Sprite", GUI_FONT_W*12, GUI_FONT_H+2)
Gui_Panel_AddObject(spriteMain_panel, spriteMain_saveButton, 4 + GUI_FONT_W*12 + 2, 4)
spriteMain_loadButton = Gui_CreateButton("Load Sprite", GUI_FONT_W*12, GUI_FONT_H+2)
Gui_Panel_AddObject(spriteMain_panel, spriteMain_loadButton, 4 + GUI_FONT_W*12*2 + 4, 4)
Gui_Window_AddPanel(main_window, spriteMain_panel, 2, TOOL_AREA_Y)
Gui_TabGroup_Tab_AddObject(main_tabGroup, main_tabGroup_spriteTab, spriteMain_panel)
'Sprite Info
spriteInfo_panel = Gui_CreatePanel(Int(MAIN_WINDOW_WIDTH/4)-2, Int(TOOL_AREA_HEIGHT/3 - 4) - Int(MAIN_WINDOW_HEIGHT/10) - Int(GUI_FONT_H*2) - 2)
spriteInfo_nameLabel = Gui_CreateLabel("Sprite Name", GUI_FONT_W * 10, GUI_FONT_H + 1)
Gui_Panel_AddObject(spriteInfo_panel, spriteInfo_nameLabel, 2, 2)
spriteInfo_nameField = Gui_CreateTextField(GUI_FONT_W * 16, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteInfo_panel, spriteInfo_nameField, GUI_FONT_W*11 + 4, 2)
spriteInfo_frameWidthLabel = Gui_CreateLabel("Frame Width", GUI_FONT_W * 11, GUI_FONT_H + 1)
Gui_Panel_AddObject(spriteInfo_panel, spriteInfo_frameWidthLabel, 2, GUI_FONT_H*3 + 2)
spriteInfo_frameWidthField = Gui_CreateTextField(GUI_FONT_W * 16, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteInfo_panel, spriteInfo_frameWidthField, GUI_FONT_W*11 + 4, GUI_FONT_H*3 + 2)
spriteInfo_frameHeightLabel = Gui_CreateLabel("Frame Height", GUI_FONT_W * 11, GUI_FONT_H + 1)
Gui_Panel_AddObject(spriteInfo_panel, spriteInfo_frameHeightLabel, 2, GUI_FONT_H*4 + 4)
spriteInfo_frameHeightField = Gui_CreateTextField(GUI_FONT_W * 16, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteInfo_panel, spriteInfo_frameHeightField, GUI_FONT_W*11 + 4, GUI_FONT_H*4 + 4)
Gui_Window_AddPanel(main_window, spriteInfo_panel, 2, TOOL_AREA_Y + GUI_FONT_H*2 + 2)
Gui_TabGroup_Tab_AddObject(main_tabGroup, main_tabGroup_spriteTab, spriteInfo_panel)
'Sprite In Stage List
spriteStageList_panel_y = TOOL_AREA_Y + (Int(TOOL_AREA_HEIGHT/3 - 4) - Int(MAIN_WINDOW_HEIGHT/10)) + 2
spriteStageList_panel_h = MAIN_WINDOW_HEIGHT - ( Gui_Panel_Y[ Gui_Element_Index[spriteInfo_panel] ] + Gui_Panel_H[ Gui_Element_Index[spriteInfo_panel] ]) - 4
spriteStageList_panel = Gui_CreatePanel(Int(MAIN_WINDOW_WIDTH/4)-2, spriteStageList_panel_h)
spriteStageList_listBox = Gui_CreateListBox(Int(MAIN_WINDOW_WIDTH/4)- GUI_FONT_W*14, spriteStageList_panel_h - GUI_FONT_H*12)
Gui_Panel_AddObject(spriteStageList_panel, spriteStageList_listBox, GUI_FONT_W*4, GUI_FONT_H)
spriteStageList_addButton = Gui_CreateButton("Add Current Sprite", Int(MAIN_WINDOW_WIDTH/4) - GUI_FONT_W*14, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteStageList_panel, spriteStageList_addButton, GUI_FONT_W*4, GUI_FONT_H + (spriteStageList_panel_h - GUI_FONT_H*12) + (GUI_FONT_H) + 2)
spriteStageList_addFromFileButton = Gui_CreateButton("Add From File", Int(MAIN_WINDOW_WIDTH/4) - GUI_FONT_W*14, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteStageList_panel, spriteStageList_addFromFileButton, GUI_FONT_W*4, GUI_FONT_H + (spriteStageList_panel_h - GUI_FONT_H*12) + (GUI_FONT_H*2) + 6)
spriteStageList_editButton = Gui_CreateButton("Edit Sprite", Int(MAIN_WINDOW_WIDTH/4) - GUI_FONT_W*14, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteStageList_panel, spriteStageList_editButton, GUI_FONT_W*4, GUI_FONT_H + (spriteStageList_panel_h - GUI_FONT_H*12) + (GUI_FONT_H*3) + 10)
spriteStageList_removeButton = Gui_CreateButton("Remove Sprite", Int(MAIN_WINDOW_WIDTH/4) - GUI_FONT_W*14, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteStageList_panel, spriteStageList_removeButton, GUI_FONT_W*4, GUI_FONT_H + (spriteStageList_panel_h - GUI_FONT_H*12) + (GUI_FONT_H*4) + 14)
Gui_Window_AddPanel(main_window, spriteStageList_panel, 2, spriteStageList_panel_y)
Gui_TabGroup_Tab_AddObject(main_tabGroup, main_tabGroup_spriteTab, spriteStageList_panel)
'Sprite Animation Tab
spriteAnimation_panel = Gui_CreatePanel(Int(MAIN_WINDOW_WIDTH/4*3)-6, TOOL_AREA_HEIGHT - Int(MAIN_WINDOW_HEIGHT/20) - 6 )
spriteAnimation_animationListBox = Gui_CreateListBox(Int(GUI_FONT_W*20), Int(GUI_FONT_H*32))
Gui_Panel_AddObject(spriteAnimation_panel, spriteAnimation_animationListBox, GUI_FONT_W, GUI_FONT_H)
spriteAnimation_newAnimationButton = Gui_CreateButton("New Animation", Int(GUI_FONT_W*20), GUI_FONT_H*2)
Gui_Panel_AddObject(spriteAnimation_panel, spriteAnimation_newAnimationButton, GUI_FONT_W, GUI_FONT_H + Int(GUI_FONT_H*34) + 2)
spriteAnimation_removeAnimationButton = Gui_CreateButton("Remove Animation", Int(GUI_FONT_W*20), GUI_FONT_H*2)
Gui_Panel_AddObject(spriteAnimation_panel, spriteAnimation_removeAnimationButton, GUI_FONT_W, GUI_FONT_H + Int(GUI_FONT_H*36) + 4)
spriteAnimation_spriteSheetSurface_w = 512
spriteAnimation_spriteSheetSurface_h = Int(GUI_FONT_H*32)
spriteAnimation_spriteSheetSurface = Gui_CreateSurface(spriteAnimation_spriteSheetSurface_w, spriteAnimation_spriteSheetSurface_h)
Gui_Panel_AddObject(spriteAnimation_panel, spriteAnimation_spriteSheetSurface, GUI_FONT_W + (GUI_FONT_W*20) + 32, GUI_FONT_H)
spriteAnimation_frameSlide = Gui_CreateImageSlide(512, 64, 64, 64)
Gui_Panel_AddObject(spriteAnimation_panel, spriteAnimation_frameSlide, GUI_FONT_W + (GUI_FONT_W*20) + 32, GUI_FONT_H*35 + 2)
for i = 0 to MAX_SPRITE_ANIMATION_FRAMES-1
spriteAnimation_frameSlide_frame[i] = Gui_CreateImageClip(0, 64, 64, 32, 32)
Next
spriteAnimation_addFrameButton = Gui_CreateButton("+", 32, 32)
Gui_Panel_AddObject(spriteAnimation_panel, spriteAnimation_addFrameButton, GUI_FONT_W + (GUI_FONT_W*20) + 32, GUI_FONT_H*35 + 68)
spriteAnimation_removeFrameButton = Gui_CreateButton("-", 32, 32)
Gui_Panel_AddObject(spriteAnimation_panel, spriteAnimation_removeFrameButton, GUI_FONT_W + (GUI_FONT_W*20) + 66, GUI_FONT_H*35 + 68)
spriteAnimation_setFrameButton = Gui_CreateButton("=", 32, 32)
Gui_Panel_AddObject(spriteAnimation_panel, spriteAnimation_setFrameButton, GUI_FONT_W + (GUI_FONT_W*20) + 102, GUI_FONT_H*35 + 68)
spriteAnimation_previewImage = Gui_CreateEmptyImage(128 , 128)
spriteAnimation_previewClip = Gui_CreateImageClip(spriteAnimation_previewImage, 128, 128, 128, 128)
Gui_Panel_AddObject(spriteAnimation_panel, spriteAnimation_previewClip, GUI_FONT_W + (GUI_FONT_W*20) + 580, GUI_FONT_H)
spriteAnimation_previewPlayButton = Gui_CreateButton("PLAY",62, GUI_FONT_H*2)
Gui_Panel_AddObject(spriteAnimation_panel, spriteAnimation_previewPlayButton, GUI_FONT_W + (GUI_FONT_W*20) + 580, GUI_FONT_H + 130)
spriteAnimation_previewStopButton = Gui_CreateButton("STOP",62, GUI_FONT_H*2)
Gui_Panel_AddObject(spriteAnimation_panel, spriteAnimation_previewStopButton, GUI_FONT_W + (GUI_FONT_W*20) + 580 + 64, GUI_FONT_H + 130)
spriteAnimation_nameLabel = Gui_CreateLabel("Anim Name", GUI_FONT_W*15, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteAnimation_panel, spriteAnimation_nameLabel, GUI_FONT_W + (GUI_FONT_W*20) + 580, GUI_FONT_H + 130 + (GUI_FONT_H*6) + 2)
spriteAnimation_nameField = Gui_CreateTextField(GUI_FONT_W*12, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteAnimation_panel, spriteAnimation_nameField, GUI_FONT_W + (GUI_FONT_W*20) + 580 + GUI_FONT_W*9, GUI_FONT_H + 130 + (GUI_FONT_H*6) + 2)
spriteAnimation_FPSLabel = Gui_CreateLabel("Anim FPS", GUI_FONT_W*15, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteAnimation_panel, spriteAnimation_FPSLabel, GUI_FONT_W + (GUI_FONT_W*20) + 580, GUI_FONT_H + 130 + (GUI_FONT_H*7) + 8)
spriteAnimation_FPSField = Gui_CreateTextField(GUI_FONT_W*12, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteAnimation_panel, spriteAnimation_FPSField, GUI_FONT_W + (GUI_FONT_W*20) + 580 + GUI_FONT_W*9, GUI_FONT_H + 130 + (GUI_FONT_H*7) + 8)
Gui_Window_AddPanel(main_window, spriteAnimation_panel, Int(MAIN_WINDOW_WIDTH/4) + 2, TOOL_AREA_Y + Int(MAIN_WINDOW_HEIGHT/20) + 2)
Gui_TabGroup_Tab_AddObject(sprite_tabGroup, sprite_tabGroup_animationTab, spriteAnimation_panel)
Gui_TabGroup_Tab_AddObject(main_tabGroup, main_tabGroup_spriteTab, spriteAnimation_panel)
'Sprite Bounds Tab
spriteBounds_panel = Gui_CreatePanel(Int(MAIN_WINDOW_WIDTH/4*3)-6, TOOL_AREA_HEIGHT - Int(MAIN_WINDOW_HEIGHT/20) - 6 )
spriteBounds_spriteSheetSurface_w = 512
spriteBounds_spriteSheetSurface_h = 512
spriteBounds_spriteSheetSurface = Gui_CreateSurface(spriteBounds_spriteSheetSurface_w, spriteBounds_spriteSheetSurface_h)
Gui_Panel_AddObject(spriteBounds_panel, spriteBounds_spriteSheetSurface, GUI_FONT_W, GUI_FONT_H)
spriteBounds_indexLabel = Gui_CreateLabel("Frame Index", GUI_FONT_W*11, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteBounds_panel, spriteBounds_indexLabel, 512 + GUI_FONT_W*4, GUI_FONT_H*4+6)
spriteBounds_indexField = Gui_CreateTextField(GUI_FONT_W*12, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteBounds_panel, spriteBounds_indexField, 512 + GUI_FONT_W*15, GUI_FONT_H*4 + 6)
spriteBounds_shapeLabel = Gui_CreateLabel("Sprite Shape", GUI_FONT_W*13, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteBounds_panel, spriteBounds_shapeLabel, 512 + GUI_FONT_W*4, GUI_FONT_H*2)
spriteBounds_shapeSelection = Gui_CreateDropDown(GUI_FONT_W*20, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteBounds_panel, spriteBounds_shapeSelection, 512 + GUI_FONT_W*15, GUI_FONT_H*2)
spriteBounds_shape_rect = Gui_DropDown_AddItem(spriteBounds_shapeSelection, "Rectangle")
spriteBounds_shape_circle = Gui_DropDown_AddItem(spriteBounds_shapeSelection, "Circle")
spriteBounds_boundXLabel = Gui_CreateLabel("Bound X", GUI_FONT_W*13, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteBounds_panel, spriteBounds_boundXLabel, 512 + GUI_FONT_W*4, GUI_FONT_H*6 + 2)
spriteBounds_boundXField = Gui_CreateTextField(GUI_FONT_W*12, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteBounds_panel, spriteBounds_boundXField, 512 + GUI_FONT_W*15, GUI_FONT_H*6 + 2)
spriteBounds_boundYLabel = Gui_CreateLabel("Bound Y", GUI_FONT_W*13, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteBounds_panel, spriteBounds_boundYLabel, 512 + GUI_FONT_W*4, GUI_FONT_H*7 + 6)
spriteBounds_boundYField = Gui_CreateTextField(GUI_FONT_W*12, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteBounds_panel, spriteBounds_boundYField, 512 + GUI_FONT_W*15, GUI_FONT_H*7 + 6)
spriteBounds_param1Label = Gui_CreateLabel("Param 1", GUI_FONT_W*13, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteBounds_panel, spriteBounds_param1Label, 512 + GUI_FONT_W*4, GUI_FONT_H*8 + 10)
spriteBounds_param1Field = Gui_CreateTextField(GUI_FONT_W*12, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteBounds_panel, spriteBounds_param1Field, 512 + GUI_FONT_W*15, GUI_FONT_H*8 + 10)
spriteBounds_param2Label = Gui_CreateLabel("Param 2", GUI_FONT_W*13, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteBounds_panel, spriteBounds_param2Label, 512 + GUI_FONT_W*4, GUI_FONT_H*9 + 14)
spriteBounds_param2Field = Gui_CreateTextField(GUI_FONT_W*12, GUI_FONT_H+1)
Gui_Panel_AddObject(spriteBounds_panel, spriteBounds_param2Field, 512 + GUI_FONT_W*15, GUI_FONT_H*9 + 14)
spriteBounds_frameViewButton = Gui_CreateButton("Frame View", 254, GUI_FONT_H*2)
Gui_Panel_AddObject(spriteBounds_panel, spriteBounds_frameViewButton, GUI_FONT_W, 512 + GUI_FONT_H+2)
spriteBounds_sheetViewButton = Gui_CreateButton("SpriteSheet View", 254, GUI_FONT_H*2)
Gui_Panel_AddObject(spriteBounds_panel, spriteBounds_sheetViewButton, GUI_FONT_W + 256, 512 + GUI_FONT_H+2)
Gui_Window_AddPanel(main_window, spriteBounds_panel, Int(MAIN_WINDOW_WIDTH/4) + 2, TOOL_AREA_Y + Int(MAIN_WINDOW_HEIGHT/20) + 2)
Gui_TabGroup_Tab_AddObject(sprite_tabGroup, sprite_tabGroup_boundsTab, spriteBounds_panel)
End Function
Function Editor_NewStage()
System("rcbasic editor.cbc top_menu_newButton")
Dlg_GetData
If Dlg_data$[0] = "#NULL" Then
Return 0
End If
s_name$ = Dlg_data$[0]
s_width = Int(Val(Dlg_data$[1]))
s_height = Int(Val(Dlg_data$[2]))
s_tile_width = Int(Val(Dlg_data$[3]))
s_tile_height = Int(Val(Dlg_data$[4]))
NewStage(s_name$, s_width, s_height, s_tile_width, s_tile_height)
'Stage Info
Gui_TextField_SetValue(stageInfo_nameField, s_name$)
Gui_TextField_SetValue(stageInfo_widthField, Str$(s_width))
Gui_TextField_SetValue(stageInfo_heightField, Str$(s_height))
'Layer Settings