Has anyone of you made a simple GUI library or can direct to one? It should be made up of graphics primitives like lines, circles, filled circles, filled rectangles etc. so I could adapt it easily.
Has anyone of you made a simple GUI library or can direct to one? It should be made up of graphics primitives like lines, circles, filled circles, filled rectangles etc. so I could adapt it easily.
Best regards,
Cybermonkey
AggPas is basically a 2D software render which can draw primitives and textures
https://github.com/graemeg/fpGUI/tre...ender/software
le programmeur
Sorry, I think I wasn't clear: I need a GUI library. I have the possibilities to draw primitives. I am looking for something like this: http://members.chello.nl/w.boeke/SDL-widgets/ but of course in Object Pascal (for SDL2) and not in C/C++. (But it needn't to be for SDL2; something "old" for unit graph will also do.)
Best regards,
Cybermonkey
I think I understand what u desire
http://zengl.org/forum/index.php/topic,358.0.html : the description is in Russian, but it shouldn't get in the way, just download and unpack the thing
This is a very basic-simple-primitive GUI for ZenGL graphics engine, and you should be able to port it to your graphics engine easily
Actually take a look at this: http://zengl-gui.googlecode.com/svn/...src/zglGui.pas
Last edited by dj_sharp; 13-07-2014 at 02:44 PM.
le programmeur
Yes, thanks. But it also uses textures/images for the GUI part. I am still looking for something simpler. Something I started but it will take too long to finish (see attached screenhot).
Bildschirmfoto vom 2014-07-13 19:08:33.jpg
Best regards,
Cybermonkey
That's probably true but it's fair enough for a retro style game.
Best regards,
Cybermonkey
Care to share what you have so far? The code I mean.
If you have started working on this in the right way I think there shouldn't be much problems in finishing your work. Writing the core part is the most difficlut part.
Now I'm willing to offer you a helping hand in this since I have played a bit in this area with designing of my Silver GUI library.
Unfortunately the current state of my Silver GUI library is not usable due to funfinished design and several bugs that can make it pretty unstable in certain scenarios. I have to do another rewrite of the core to avoid most of the current problems and also add ability to exted it with some new fetures that I want to add.
Hm, it's a real ugly hack I did and not object oriented at all. Something I have so far is a type for a button like this:
I create a button the following way:Code:type TButton= record x,y,width,height:integer; caption:string; id:integer; clicked:boolean; end;
Then I have to take care of the event loop (in a REPEAT...UNTIL loop):Code:button :=createbutton (500,400,'QUIT');
I know it's a rather ancient way to do so but for that kind of retro GUI sufficient enough (IMHO). The function mouseonbutton means that the mouse cursor is on the button and the left mouse button is pressed ...Code:if mouseonbutton (button) then begin drawbuttonpressed (button); button.clicked:=true; end else begin drawbutton (button); end; if button.clicked=true then begin buttononlick(); button.clicked:=false; end;
New version with text input:
Bildschirmfoto vom 2014-07-15 20:50:03.jpg
Last edited by Cybermonkey; 15-07-2014 at 06:51 PM. Reason: Added screenshot
Best regards,
Cybermonkey
Not sure if it is of help:
http://opensoft.homeip.net/fpgui/
http://www.sulaco.co.za/opengl_project_glWindows.htm
cheers,
Paul
Games:
Seafox
Pages:
Syntax Error Software itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
Bookmarks