Message Board


Message Board > Fenix / Bennu / Gemix / DIV > GUI.dll

January 21, 2007, 18:18
yonni
None
420 posts
I've been trying to use GUI.dll without success, and I don't know why. I get no errors, but equally, nothing is displayed on screen, here is the code for it:

Code:
process controls()     
private
    window;
    control;  
begin               
    window = window("Controls",STYLE_STATIC);
    control = button("LOAD",type load);
    window_addcontrol(window,108,10,control);
    control = button("SAVE",type save);  
    window_addcontrol(window,108,30,control);
    control = button("EXIT",type exit);
    window_addcontrol(window,80,450,control);
    control = inputline(10,load_text); 
    window_addcontrol(window,10,10,control);
    control = inputline(10,save_text);      
    window_addcontrol(window,10,30,control);  
    window_set(window, WINDOW_MODAL, TRUE);   
    desktop_addwindow(window);               
    window_resize(window,160,480);
    window_move(window,480,0);      
    loop                            
        frame;
    end;
end;                  


Is there something that I've missed that I need in order for the window to display?
____________
#
January 21, 2007, 21:10
Rincewind
programmer
1545 posts

(A bit off-topic but I just wanted to let you know ";" behind end's aren't necessary.)
____________
Personal website: http://www.loijson.com
#
January 21, 2007, 21:28
yonni
None
420 posts
Quoting Rincewind:
(A bit off-topic but I just wanted to let you know ";" behind end's aren't necessary.)


meh, just habbit, can't remember where I got it from.
____________
#
January 21, 2007, 22:46
yonni
None
420 posts
got it! I was missing "gui_show(-255)" (where the perameter is the z value of the GUI)
____________
#
February 4, 2007, 02:09
Sandman
F3n!x0r
1194 posts

So Yonni. Could you tell me some stuff about GUI.dll? What do you feel are pros and cons? Is it fast or slow? Is it hard to work with? Is the result satisfactory?
I was/am making something similar you see, so I wonder how much use it would be. If GUI.dll is eating a lot of resources, I still have a meaning to make my own.
If anyone else has something to say about GUI.dll, please do so. Thanks.
____________
BennuWiki
Yes, my avatar has grey borders in IE (so get a decent browser)
ROOFLEZ ROOFLEZ
#
February 4, 2007, 02:55
Mezzmer
Square-theorist
792 posts

gui is so aweomse
____________
#
February 4, 2007, 11:05
yonni
None
420 posts
I was only using a few simple elements of it to use within a level editor (buttons and textboxes really) because I couldn't be bothered with making my own textboxes.

The major con that I did find was that you needed to have a window to display anything onto the screen, thats a GUI window within the main window made using DESKTOP_ADDWINDOW. But that, I suppose, is not such a problem if you need it for something a bit more complicated.
The other con that I did find was that there is a woefully small amount of english documentation for it (I didn't look at anything in spanish I'm afraid) with noone presenting a full list of its functions. The best documentation for it that I found was in here, but I think that that also leaves out some of the functions of the GUI.dll.


Pros, once you know what the commands do, and which commands you want to use (which didn't take long at all really, most time was spent looking at what else it could do) you can create functional buttons and textboxes, radio buttons, menus, etc. with minimal to no effort and that work perfectly.
In my experience the textboxes made with GUI.dll work much faster than most home-made textboxes. I think this is probably due to the fact that home-made ones wait for all keys to be completely released before accepting another input, whereas normal (GUI.dll) textboxes will also accept another key input whilst one is still depressed.

I hope that last sentence makes sense to you.

Anyway, I would use GUI.dll for any purpose that needs any of the contols that GUI offers. Unless, of course, you want to build your own textboxes, buttons, radio buttons, menus, checkboxes, windows etc, etc.
I can't really help you on the whole eating up resources front. It didn't slow me down at all, but then I think that the code above is the extent to which I used it, and being an editor, there wasn't much happening elsewhere either.
____________
#
February 4, 2007, 14:01
Sandman
F3n!x0r
1194 posts

Thanks for your elaborate reply.
My own textboxes work like GUI.dll's ones, so that's not a problem.
Still, GUI.dll looks very nice and has a lot of features. Hard to decide whether I should continue my work. The pros would be the possible speed gain and that I can customize it. I think for the time being I'll keep working. It's a cool challenge to make something as awesome as the GUI.dll.
____________
BennuWiki
Yes, my avatar has grey borders in IE (so get a decent browser)
ROOFLEZ ROOFLEZ
#
February 5, 2007, 14:07
Dennis
どこかにいる
2092 posts

Quoting Rincewind:
(A bit off-topic but I just wanted to let you know ";" behind end's aren't necessary.)
";" behind parameter declaration of a process aren't necessary either, still everyone I know does it. :eyeroll:
____________
Kwakkel
#
February 5, 2007, 18:17
Sandman
F3n!x0r
1194 posts

I dont't. I find that inconsequent, because the actual process body has yet to come and the semicolon signals an end, so I would place it rather at the end of the body. But that's the END for, innit.
____________
BennuWiki
Yes, my avatar has grey borders in IE (so get a decent browser)
ROOFLEZ ROOFLEZ
#

Message Board > Fenix / Bennu / Gemix / DIV > GUI.dll

Quick reply


You must log in or register to post.
Copyright © 2005 Booleansoup.com
Questions? Comments? Bug reports? Contact us!