Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Looking for simple GUI library/framework

  1. #1

    Looking for simple GUI library/framework

    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

  2. #2
    AggPas is basically a 2D software render which can draw primitives and textures
    https://github.com/graemeg/fpGUI/tre...ender/software
    le programmeur

  3. #3
    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

  4. #4
    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

  5. #5
    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

  6. #6
    PGDCE Developer Carver413's Avatar
    Join Date
    Jun 2010
    Location
    Spokane,WA,Usa
    Posts
    206
    Quote Originally Posted by Cybermonkey View Post
    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
    I can't see where that will look good in a game. with the explore I draw to textures and display them with opengl. the actual drawing is handled with scripts so the look can be changed easily to fit the game

  7. #7
    That's probably true but it's fair enough for a retro style game.
    Best regards,
    Cybermonkey

  8. #8
    Quote Originally Posted by Cybermonkey View Post
    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).
    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.

  9. #9
    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:
    Code:
    type TButton= record
    x,y,width,height:integer;
    caption:string;
    id:integer;
    clicked:boolean;
    end;
    I create a button the following way:
    Code:
        button :=createbutton (500,400,'QUIT');
    Then I have to take care of the event loop (in a REPEAT...UNTIL loop):
    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;
    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 ...
    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

  10. #10

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •