Author Topic: Sparta 2.0b GUI Library [With DoorsCS 7 style GUI available]  (Read 787 times)

0 Members and 1 Guest are viewing this topic.

Offline thydowulays

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 184
  • Rating: +12/-1
  • Don't gimme dat lip
    • View Profile
    • Thy Gaming Forum
Sparta 2.0b GUI Library [With DoorsCS 7 style GUI available]
« on: January 03, 2012, 06:53:43 pm »
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:

Code: [Select]
.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)

Current Projects:
-Sparta GUI Library: 25% - Alpha Stage
-Grapher - 75% - Beta Stage *on hiatus




Offline thydowulays

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 184
  • Rating: +12/-1
  • Don't gimme dat lip
    • View Profile
    • Thy Gaming Forum
Sparta 2.0 FINAL Update!
« Reply #1 on: January 04, 2012, 08:40:49 pm »
Hey everyone! I have finally finished Sparta! w00t!  :w00t: Now it's time to release. I have included a Gif file below, and my final zip file, and my README.
The only command that has changed is DRB(). DRB() is now:

DRB(Xpos, Ypos, "Button")

Yes, there is no more width, height, or negative and regular button options anymore. For optimization and simplicity, I have made the button auto-adjust to the text you put there. By creating a simple algorithm using the length( command, I have achieved auto-sizing buttons! So yes, I have a way better program example below. Its a (working) fake errors program written in about 20 minutes solely for the purpose of this library. The screenie below shows the full potential of the library, except for the checkbox command.

Thanks everyone for your feedback! I am now going to be working with alberthrocks and his crew over at their GUI library! In the meantime, enjoy this one (if you even view this topic lol) and report any bugs to this post! Thanks!
Current Projects:
-Sparta GUI Library: 25% - Alpha Stage
-Grapher - 75% - Beta Stage *on hiatus




Offline turiqwalrus

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 840
  • Rating: +51/-2
  • Wheeeeeee~!
    • View Profile
Re: Sparta 2.0b GUI Library [With DoorsCS 7 style GUI available]
« Reply #2 on: January 05, 2012, 06:33:23 am »
about the auto-sizing buttons, though...
What if I want three same-sized buttons with different text inside them?

Otherwise, good work, though :D

Offline thydowulays

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 184
  • Rating: +12/-1
  • Don't gimme dat lip
    • View Profile
    • Thy Gaming Forum
Re: Sparta 2.0b GUI Library [With DoorsCS 7 style GUI available]
« Reply #3 on: January 05, 2012, 07:19:46 am »
Well, the buttons would have to have the same number of letters inside them. Thanks though, besides, If you don't like the button thing, you can download from the link above and then you can adjust the width and height :)
Current Projects:
-Sparta GUI Library: 25% - Alpha Stage
-Grapher - 75% - Beta Stage *on hiatus