Hey everyone! Yes this is a new thread, I couldn't manage to change the title of my old thread and this is a completely brand new library then before. Inspired by BuilderBoy's Zedd Physics library, the Sparta GUI Library has an extensive range of GUI objects to choose from. From frames to checkboxes, this library has a lot to offer.
Let's start with the commands:
CLR() : Added for simplistic clearing with less keystrokes. (same thing as doing ClrDraw and ClrDrawr)
BUFF() : Added for simplistic drawing with less keystrokes. (same thing as doing DispGraph and DispGraphr)
DRF("String of Text") : Draws a DoorsCS style framed window with an X button. The "String of Text" is displayed on the top bar.
DRB(Xpos,Ypos,Width,Height,"Text inside button", 1) : Draws a button (will be DoorsCS style soon) at positions X and Y, with Width and Height. The 1 at the end represents whether the button is inverted or not. If it is, put a 1 at the end. If it isn't, put a 0
DRDIA("Title on top","Stuff inside 1", "Stuff inside 2", "Stuff inside 3", 1) : Draws a DoorsCS style dialog box in the center of the screen. The 1 at the end represents whether the dialog is enabled or not.
DRCH(Xpos,Ypos,"Text",1) : Draws a DoorsCS style text box at position X and Y. The 1 at the end is whether the box is checked or not.
DRM(Xpos,Ypos) : Draws a DoorsCS style mouse pointer (all black) at position X and Y.
More commands will be coming soon as the library is still in beta.
Example program using Sparta:
.GUITEST
46->X
26->Y
Repeat getKey(15)
CLR()
DRF("Window")
DRB(25,20,25,10,"Button",1)
DRM(X,Y)
BUFF()
If getKey(4)
Y-1->Y
End
If getKey(1)
Y+1->Y
End
If getKey(2)
X-1->X
End
If getKey(3)
X+1->X
End
End
Return
prgmSPARTA
A more extensive GUI example can be found below (prgmFAKE)
Known Bugs:
- Program will slow down significantly when a dialog box is present
- (Fixed) GUI objects would randomly disappear
Feel free to leave your feedback below! (Please keep it unbiased)