-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|391|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Snippet Home -> Text and GUI's


 
Hotshot
Created : 18 December 2007
Edited : 18 December 2007
System : Windows
Language : Blitz

Create Box with Text




 

Comments


Wednesday, 19 December 2007, 04:31
Jayenkai
A nice simple function.
Can be easily expanded in multiple ways, for example.

This version takes a single "Pad" value, and finds it's own values for X,Y,X1 and Y1. (And centers everything around the TX,TY co-ords)


Fills the box with 1/3rd color, giving it a fuller appearance.


3D style..

By drawing a light color on the top left, a dark color bottom right, and a mid color for the center, you create a classic "Button" style box instead.

You could then extend this to use different colors for the box and the text, or if you use Globals to define the box color, you can start to build up your own color-tweakable GUI, too!



Very handy things to have if you're going to make a nice clickable menu screen.
Wednesday, 19 December 2007, 11:59
steve_ancell
I did something similar to that a few years ago, mine is not that good though.

membres.lycos.fr/blitzcoder/code.shtml

Or just incase the link to it goes dead, I will put it in a code box on here...




|edit| The 3D one that you have done above,looks good BTW . |edit|
Wednesday, 19 December 2007, 13:21
power mousey
cool!

what would be even cooler and weird is to open
the 3d box or cube and reveal all the sides opening up
and let the 3d text come out.
And then close up the sides again
of the 3d box.

ahhhhhhhhhh!
Thursday, 20 December 2007, 06:40
spinal
slight modification, moves the text when button pressed, looks more pressed now.