' Particle Pinch ' ' Copyright 2005 Ian Cowburn ' ' $Id$ ' Strict Import noddybox.vector Import noddybox.bitmapfont Import noddybox.simplegui Import "types.bmx" Import "level.bmx" Import "game.bmx" Function LevelDesigner() DoDesigner() End Function Private ' **** Globals ' Type Designer Const TEXTX:Int=100 Global init:Int=False Global levelset:TLevelSet Global level:TLevel Global levelsetfname:String Global done:Int Global levelindex:Int Global gui:TGUIHandler Global fname_lab:TLabel Global fname_txt:TText Global setname_lab:TLabel Global setname_txt:TText Global levname_lab:TLabel Global levname_txt:TText Global hide_check:TCheckbox Global validbut:TButton Global helpbut:TButton Global quitbut:TButton Function Initialise() If Not init TGUIFont.font = GameGFX.guifont levelset = New TLevelSet level = New TLevel levelsetfname = "Default.ppinch" done = False levelindex = 0 gui = TGUIHandler.Create() fname_lab = TLabel.Create(gui,0,0,"File") fname_txt = TText.Create(gui,TEXTX,0,"",32) setname_lab = TLabel.Create(gui,0,10,"Levelset name") setname_txt = TText.Create(gui,TEXTX,10,"",32) levname_lab = TLabel.Create(gui,0,20,"Level name") levname_txt = TText.Create(gui,TEXTX,20,"",32) hide_check = TCheckbox.Create(gui,700,0,"Hide GUI",HideCallback) validbut = TButton.Create(gui,650,570,49,29,"Check",CheckCallback) helpbut = TButton.Create(gui,700,570,49,29,"Test",TestCallback) quitbut = TButton.Create(gui,750,570,49,29,"Quit",QuitCallback) levelset.level.AddLast(level) init=True EndIf fname_txt.text = levelsetfname setname_txt.text = levelset.name levname_txt.text = level.name End Function End Type ' **** Main Loop ' Function DoDesigner() Designer.Initialise() Designer.done=False While Not Designer.done Cls Designer.gui.EventLoop() DrawImage(GameGFX.pointer,MouseX(),MouseY()) Flip FlushMem Wend End Function ' **** Utils ' Function LoadLevel() End Function Function SaveLevel() End Function ' **** Callbacks ' Function HideCallback(w:TWidget) Local c:TCheckbox=TCheckbox(w) Designer.gui.SetEnable(Not c.checked) c.enabled=True End Function Function QuitCallback(w:TWidget) Designer.done=GUIYesNo("Quit back to the|main menu of Particle Pinch?",GameGFX.pointer) End Function Function TestCallback(w:TWidget) End Function Function CheckCallback(w:TWidget) End Function