sgx ist eine include, mit der man einfache gadgets im screen erstellen und verwalten kann.
doku ist leider nur in englisch.
zum kennenlernen am besten anfangen mit sgxDoc\sgx.html und weiter mit den beispielen im selben ordner.
sgx is a screen-gadget library for PureBasic programmers to create and manage simple GUI-elements in a fullscreen or windowed screen.
it's available as sourcecode to be included in your projects. it's currently only available for Windows Operating Systems (though the code is pretty straight PB code). there are two versions: a single-file version that only contains the necessary files to just use sgx and a multi-file version in case you want to make changes to the sgx code, including the gimp files for the image files and some tools to build a single-file version from that.
with this library you can create simple GUI objects statically or dynamically of different type and appearance, modify them, display them easily, examine user actions and process events. sgx elements are accessed by ID (index-like, starting with index 1). the appearance is defined by designs, whereas you can create own designs with sets of images (there is also an instant design "lowbudget" which does not need any image files). currently there is no event queue, you will recognize events by checking for fields of your sgx elements.
currently available gadget types:
- sgxCursor
- sgxButton (including toggle buttons and buttons with a user sprite)
- sgxText
- sgxCheckbox
- sgxCombo
- sgxScrollbar
- sgxTrackbar
- sgxEdit
- sgxWin
- sgxTable
- sgxSpriteGadget
- sgxArea
- option gadgets / radio buttons are available through grouping
the documentation includes
- a quick start (sgxDoc\sgx.html)
- a full reference (sgxDoc\sgxDocFull.html)
- a smaller reference (sgxDoc\sgxDoc.html) without sgx internals (some links to sgx internals may not work in that document thought!)
- examples in the directory 'sgxDoc\'
- _README.TXT contains further informations
[...]
thanks to the PureBasic team and the community / the forums.
Zuletzt geändert von #NULL am 21.06.2016 18:50, insgesamt 8-mal geändert.
Bin auch dabei eine Include für Window, Gadget, Menu, ToolBar, ... für Screens zu schreiben, wo man selber den Style in vom von INI, und Bild dateien einstellen kann ähnlich die die Styledateien *.css
bin gespannt wie sich deins entwickelt
EDIT: Wenn man gerade in dem StringGadget schreibt gehen die Frame stark nach unten ( 20 FPS )
Vllt sollte das noch mal überarbeitet werden
ja. das edit macht noch probleme.
übrigens sind die FPS der demo-exe nicht brauchbar, weil das wenigste darin direkt was mit sgx zu tun hat und start/stopdrawing verwendet wird (außerhalb von sgx).
<edit / edit2 (hab die fps.pb ein bisschen verkürzt) >
hier noch'n FPS test (800x600-screen) : <link weg / mit im zip>
man sieht auch das die framerate zunimmt, wenn fenster minimiert oder geschlossen werden. die last liegt hauptsächlich auf DisplayTransparentSprite(..) und nimmt mit anzahl und grösse der elemente zu. im leerlauf ist sgx (abesehen vom edit ) eigentlich recht fix.
der refresh vieler elemente auf einmal kann aber auch sehr lange dauern.
Zuletzt geändert von #NULL am 31.01.2008 03:01, insgesamt 1-mal geändert.
ja wie das so ist. über lizenz hab ich mir noch keinen kopp gemacht, kenn mich mit sowas auch nicht aus. aber da hat hier sicher jemand einen tip. aber im grunde soll es für jegliche zwecke nutzbar sein, auch kommerziell von mir aus. hauptsache source ist verfügfbar.
#NULL hat geschrieben:hauptsache source ist verfügfbar.
Das bedeutet, nur OPenSorce projekte dürften deine Includes
verwenden? Da würde sich die GPL anbieten ... mit Lizenzen wirst
dich aber zwangsweise mal beschäftigen müssen, fals du die Benutzung
wirklich irgend wie einschränken willst ... damit du am ende auf der
sicheren seite bist
@#Null - wie hast Du deines realisiert? Ich hab auch so ne Lib geschrieben - findet man in der PBOSL - die so was macht. Ich habe alles direkt zeichnen lassen...