Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Sunshow Pro V3.0 - <b>drawinbutton()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DrawInButton()

Draw a 3-D button in IN position in graphic mode


Syntax

DrawInButton(<nRow>, <nColumn>, <nFontPoints>, ;
   <nForegroundIndex>, <nBackgroundIndex>, ;
   <nLightColorIndex>, <nShadowColorIndex>, ;
   <nBoxColorIndex>, <cMessage>)


Arguments

<nRow>
Top left row origin of beveled button to draw.

<nColumn>
Top left column origin of beveled button to draw.

<nFontPoints>
Font height in pixels (8, 14, or 16).

<nForegroundIndex>
The foreground color index (The color of the button text), usually black 
(index 0).

<nBackgroundIndex>
The background color index (The face of the button and background text 
color), usually white (index 7).

<nLightColorIndex>
The beveled edge highlight color, usually bright white (index 15).

<nShadowColorIndex>
The beveled edge shadow color, usually dark grey (index 8).

<nBoxColorIndex>
The color of the box edges, usually black (index 0).

<cMessage>
Button legend or text string.


Returns

0
Success.

-1
DrawInButton() can not draw in this graphic mode.

-2
Font size to small.

-3
An EGA card is required to use an 8 x 14 font.

-4
A VGA card is required to use an 8 x 16 font.

-5
Row to large, it should be less than (vertical resolution / font points).

-6
Column to large, it should be less than 40 or 80 when the horizontal 
resolution is 320 or 640.

-7
Unknown character found in picture.

-8
Can not allocate memory for line buffer.

-99
Parameters are invalid.


Remarks

Draw a 3-D beveled button in the IN position at (<nRow>, <nColumn>), with 
specified colors. DrawInButton() works similar to SunSay() in that it writes 
graphic mode string or message at row and column coordinates within a 
beveled button. DrawInButton(), however, requires no picture clause. In 
order for this function to have correct button colors when superimposed on 
top of or next to an image, the default palette must be used. 


Example

Refer to DrawOutButton() for a complete working example of the use of 
3D button functions with the live graphic mode mouse functions.

nStatus = FindVideoMode(640,480,16)
nStatus = ClearWin(1,8,0,0,59,79)
nStatus = DrawOutButton(56,4,8,0,7,15,8,0,"Button1")
nStatus = DrawInButton(56,13,8,0,7,15,8,0,"Button2")
nStatus = DrawOutButton(56,22,8,0,7,15,8,0,"Button3")
nStatus = DrawOutButton(56,31,8,0,7,15,8,0,"Button4")
nStatus = Sleep(10)
nStatus = TextMode()

For other examples of how to use the DrawInButton() function, see 
SUNMOUSE.PRG, an example program distributed with Sunshow Pro.



See Also: DrawOutButton() DrawBeveledBox()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson