Caption Panels

Parent : build

Use query_panelcommand to display caption panels in the mud and generates caption panel 3d tags. This function is in threed.

query_panelcommand is in the format:

query_panelcommand(panel,command,command2,title,halign,valign,fontsize,width,height,state)

with the following parameters:

panel is the name of the panel (eg 'inv' for inventory)
command is an array of buttons (or just one button)
command2 if command is one button then command2 is the mud command to perform when clicked
title title of the caption panel
halign is the horizontal alignment (l)eft, c)entre, r)ight
valign is the vertical alignment (t)op, c)entre, b)ottom
fontsize font size
width width of caption panel
height height
state o is open, c is close

For example:
write(THREED->query_panelcommand("","exchange voucher", 0,0,0,0,0,0,0,"o"));

The above example will generate tags that will add a single button called 'exchange voucher' to the caption panel that has a blank name. "o" signifies that the caption panel should be popped open.

Another example where have an array of buttons:

pnls=[

"bet 1","bet 10","bet 50","bet 100","bet 1000",
"hit","stand","split","double","pass","hand","leave",
["bet other amount","bet #"],["blackjack rules","rules"]

];

write(THREED->query_panelclear("gaming"));
write(THREED->query_panelcommand("gaming",pnls,0,"Blackjack:","r","t",0,0,0,"o"));

Here specifies a caption panel with 14 buttons with the captions. You will notice the last two button in the array are made up of arrays themselves. The first element of the array is the button caption and the second is the command to perform. If no second element is specified then the caption and command are the same.
The title of the caption panel is 'Blackjack:' and it is aligned top right of screen and is popped open.

query_panelclear will generate the tags needed to clear the panel called 'gaming' otherwise the buttons would be added on top any existing buttons that are in the 'gaming' panel.