Quote from: Dennisc on December 17, 2006, 12:49:29 PM
Do you remember the restaurant example that was on the Pyxia website?
I do. I wrote it. Glad you liked it.ÂÃ, 8)
I no longer have it (hard drive failure), but feel free to convert any copy you can find.
ok here a nice requester.. (needs ctl.inc)
$include "ctl.inc"
def e1:window
def level:int
level=0
'--------------------------------------------------------------------------
openwindow e1,0,0,200,80,@nocaption|@noautodraw,0,"test",&ehnd
CONTROL e1,@BUTTON,"yes",10,55,80,20,0 ,1
CONTROL e1,@BUTTON,"no",110,55,80,20,0 ,2
FOR N=1 TO 10:SETFONT e1, "arial",8 ,700,0x00A10000,N:NEXT N
fcol=RGB(90,90,90) :bcol=RGB(200,200,200) :Vignette(e1,0,0,200,80,fcol,bcol)
DRAWMODE e1, @TRANSPARENT
SETFONT e1, "arial", 10 ,700,0x00A10000
FRONTPEN e1, RGB(200,200,200):move e1,41,21:print e1,"Select bla bla ??"
FRONTPEN e1, RGB(200,200,200):move e1,41,21:print e1,"Select bla bla ??"
SETCONTROLCOLOR e1, 1, RGB(0,0,0),rgb(0,255,0)
SETCONTROLCOLOR e1, 2, RGB(0,0,0),rgb(255,0,0)
WindowOnTop(e1.hwnd,True)
starttimer e1,40
waituntil e1.hwnd=0
closewindow e1
end
'--------------------------------------------------------------------------
sub ehnd
select @class
case @idtimer
WinAlpha(e1.hwnd,level)
level+=10
if level>255 then level=255
case @idcreate
centerwindow e1
WinAlpha(e1.hwnd,0)
case @idclosewindow
closewindow e1
CASE @IDCONTROL
SELECT @CONTROLID
CASE 1
IF @NOTIFYCODE = 0
end
ENDIF
CASE 2
IF @NOTIFYCODE = 0
end
ENDIF
ENDSELECT
endselect
return
endsub
'--------------------------------------------------------------------------
Sub Vignette(wn as Window, x as int, y as int, w as int, h as int, fc as Uint, bc as UInt)
'linear vignette from top to bottom, fc to bc
float col[3],scol[3]
int i,j
'Split the RGBColour into its components
col[0]=fc%256 :'Red
col[1]=(fc%65536)/256 :'Green
col[2]=fc/65536 :'Blue
'Work out the difference between the forecolour and the backcolour
scol[0]=((bc%256)-col[0])/h :'Red
scol[1]=(((bc%65536)/256)-col[1])/h :'Green
scol[2]=((bc/65536)-col[2])/h :'Blue
'Do the vignette
for i=0 to h
Line wn,x,y+i,x+w,y+i,RGB(int(col[0]),int(col[1]),int(col[2]))
'Adjust the base colour
for j=0 to 2
col[j]+=scol[j]
next j
next i
return
EndSub
Thanks to Michael Rainey, here is the file. I have not tried to convert it since I am focusing on Aurora.
And here is the Peaslee's Reviewer example converted to EBasic. Download Example.zip attached to Peaslee's earlier message and replace the .iba source file with this .eba source file.
Have fun!
Regards
Dennis