Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / [b]text box and buttons[/b]

Author
Message
Terabyte
22
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 16th Jan 2003 14:18
here comes a very long string!

I know a very niceway of making windows style buttons and text boxes appear on your screen rather than just the flat crapy looking box that i have seen on many menu's and games
it works better than sprites work because you dn't have to piss about with mipmapping on the sprite or fuzzy edges.
another good thing about this method is that in bsp maps often you end up loading a sprite and all the textures on the walls stretch and go funny.

O.K. here goes
if you take a screen shot of a windows button and paste into paint you can zoom in onto the button and what it looks like.

beveled edges are produced by a darker colour (well der!!)
so why don't you make buttons appear on your level by using ....

........THE BOX COMMAND!!!

no seriously erm...

windows style buttons look much better if you make them using the box command and not sprites.
i am not using my computer at the moment so i can't give you a standard code to use, but i can tell you that to make a windows button it took me about 8 lines.

things to remeber.
1) place the button commands in your LOOP!
2) make sure if you use 640x480 that your buttons are actually on the screen and not somewhere in the 680x500 area!!
you can detect wether the button has been pressed by typing
if mousex()>0 and mousex()0 and mousey()
I have a word of advice...
..don't piss on an electric fence!
Kangaroo2
22
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 16th Jan 2003 16:30
I agree, in my GUIs I do this. However I use sprites on top for the exit, minimize, resize buttons, as its really easy to detect collision between them and the mouse

Dr OcCuLt
22
Years of Service
User Offline
Joined: 27th Nov 2002
Location: a Dark Deep Dark pit, it dark in here
Posted: 17th Jan 2003 01:52
you can get a windows button by calling a DLL i do`t now what DLL it is i thick it may be WIN32?

Login to post a reply

Server time is: 2025-05-19 13:19:40
Your offset time is: 2025-05-19 13:19:40