Greetings, I am presented to realize what you see in these video, a roulette wheel of fortune. Some idea of what tools to use or where to start for this job.? thanks in advance, regards ...
Gracias a mi Dios ante todo!
Greetings, I am presented to realize what you see in these video, a roulette wheel of fortune. Some idea of what tools to use or where to start for this job.? thanks in advance, regards ...
#include "fivewin.ch"
//----------------------------------------------------------------------------//
function Main()
local cImage, oImage
local oDlg
cImage := "c:\fwh\bitmaps\alphabmp\widgets.bmp" // your image file
DEFINE DIALOG oDlg SIZE 500,400 PIXEL TRUEPIXEL
@ 20, 20 XIMAGE oImage SOURCE cImage SIZE 256,256 OF oDlg
@ 20,300 BTNBMP PROMPT "Spin" SIZE 160,40 PIXEL OF oDlg FLAT ;
ACTION Spin( oImage )
ACTIVATE DIALOG oDlg CENTERED
return nil
//----------------------------------------------------------------------------//
function Spin( oImage )
local nStep := 5
local n
for n := 1 to 1000 / nStep
oImage:Rotate( nStep )
SysWait( 0.005 * nStep )
next
return nil
//----------------------------------------------------------------------------//Mr. NAGE, simplemente ESPECTACULAR, muchas gracias, es lo que necesitaba, no sabia seria tan facil, saludos, gracias...
Mr. NAGE, simply SPECTACULAR, thank you very much, it's what I needed, it would not be so easy, greetings, thanks... ![]()
Dear Mr. Rao,
thank you. This is really a nice sample.
Best regards,
Otto

#include "fivewin.ch"
function Main()
local cImage, oImage
local oDlg
cImage := "..\bitmaps\alphabmp\widgets.bmp" // your image file
DEFINE DIALOG oDlg SIZE 500,400 PIXEL TRUEPIXEL TRANSPARENT
@ 20, 20 XIMAGE oImage SOURCE cImage SIZE 256,256 OF oDlg NOBORDER
@ 20,300 BTNBMP PROMPT "Spin" SIZE 160,40 PIXEL OF oDlg FLAT ;
ACTION Spin( oImage )
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT BuildBrush( oDlg )
return nil
// -------------
function BuildBrush( oDlg )
local oImage, oBrush, aRect := oDlg:GetRect()
DEFINE IMAGE oImage FILENAME "..\bitmaps\backgrnd\blustone.bmp"
oBrush := TBrush():new( ,,,, ResizeBmp( oImage:hBitmap, aRect[4], aRect[3], .T. ) ) // 1 = stretch, 2 : fitoutside, 3:fitinside
oImage:End()
oDlg:SetBrush( oBrush )
oBrush:End()
return nil
//----------------
function Spin( oImage )
local nStep := 5
local n
for n := 1 to 1000 / nStep
oImage:Rotate( nStep )
SysWait( 0.005 * nStep )
next
return nil
Maybe you can get the number from the current rotation angle?
EMG
Do not put the arrow inside ximage rectangle. Place it as separate bitmap on the right side of ximage.
Visually user can read the number
Through program you should derive the number from oImage:nRotation
Enrico Maria Giordano wrote:Maybe you can get the number from the current rotation angle?
EMG
nageswaragunupudi wrote:Do not put the arrow inside ximage rectangle. Place it as separate bitmap on the right side of ximage.
Visually user can read the number
Through program you should derive the number from oImage:nRotation
ukoenig wrote:Converted and repainted to a real alphablended PNG
maybe You like it
http://www.pflegeplus.com/IMAGES/Roulette.png
regards
Uwe
If the calculation of the degree of 360 / n is that of the division of the divisions, the que no se hacer es como determines the position of the figure or the degree resulting in an associado to dicha figure, at the same time it refiero y no se que propiedad de la clase me devuelve el grado resulting ya que la roulette puede llegar to give varias vueltas antes de detenerse como es logico que suceda ... alguna idea de como obtengo en la clase and the resultant result. saludos...gracias...
Se como calcular lo de los grados que es 360 / n que es la cantidad de diviciones, lo que no se hacer es como determinar la posicion de la figura o el grado resultando asociado a dicha figura, a eso me refiero y no se que propiedad de la clase me devuelve el grado resultante ya que la ruleta puede llegar a dar varias vueltas antes de detenerse como es lo logico que suceda...alguna idea de como obtengo en la clase el grado resultante.? saludos...gracias... ![]()
oImage:nRotate --> Degrees
nDegrees := oImage:nRotate % 360
nageswaragunupudi wrote:oImage:nRotate --> Degrees
nDegrees := oImage:nRotate % 360