Thread: Button shapes
View Single Post
Old 11-17-2002, 01:35 AM   #5
Haliken
Quintessence of EQUI XML
 
Haliken's Avatar
 
Join Date: Sep 2002
Posts: 773
Interface Author - Click to view interfaces
Default

OK.
First let me explain a concept I call "button shields"

Let's say we have a button that is 100 pixels tall and 20 pixels wide. Imagine it: it's a tall rectangle. But let's say we want it to act like two seperate buttons (one 20x20 and one at the bottom 20x20. Because the EQ UI doesn't allow more than one of a ingle button we can't have two seperate buttons. But we CAN make one button and put and invisible area over the middle section so it seems like there are two different buttons. How this is accomplished is by making an invisible barrier that cover the button from 0 (x coord on the button) by 20 (y coord on the button) and make the invisible barrier have a width of 20 and a height of 60. Can you imagine this? It's a tall rectangular button with an invisible area (also a rectangle) over the middle where clicking doesn't click the button or highlight it during mouseover, but the areas at the top and button still function properly.

The invisible barrier has to be made of a TabBox, it should be empty (so no one can see it), this is because tabbox's don't get sent behind other objects if an object that is layered behind them is clicked. If the invisible layer were an invisible button, when you clicked on the button that it was over, the invisible button would be sent behind it and would no longer be a barrier.

So, how can you use this to shape buttons? VERY carefully. Let's say you want to make an I-shaped button.

First, you'd make a vertical rectangular button (I'll make sucky ascii diagrams):
000000
000000
000000
000000
000000
000000
000000
000000

Then you'd put two invisible tabbox's over the left and right center area of the button (X's represent invisible tabbox's):
000000
000000
XX00XX
XX00XX
XX00XX
XX00XX
000000
000000

Now you have an I-shaped button! For things like circles you'd need many more carefully placed invisible tabbox's. If you don't know how to make a tabbox invisible, or you want an example for how to make a button a certain shape that you want, leave a post. I just got in a Plane of Innovation group so I'm outta here for a bit. I'll post more later.

Enok
Haliken is offline   Reply With Quote