CmdDial

From MCS Wiki AVR
(Difference between revisions)
Jump to: navigation, search
 
Line 70: Line 70:
 
' A dial set to 50%
 
' A dial set to 50%
 
CmdDial 80, 60, 55, 0, &H8000
 
CmdDial 80, 60, 55, 0, &H8000
</source> pic1 <source lang="bascomavr">
+
</source> [[File:Clip0006.png|center|Clip0006.png]] <source lang="bascomavr">
 
' Without the 3D look
 
' Without the 3D look
 
CmdDial 80, 60, 55, OPT_FLAT, &H8000
 
CmdDial 80, 60, 55, OPT_FLAT, &H8000
</source> pic2 <source lang="bascomavr">
+
</source> [[File:Clip0007.png|center|Clip0007.png]] <source lang="bascomavr">
 
' Dials set to 0%, 33% and 66%
 
' Dials set to 0%, 33% and 66%
 
CmdDial 28, 60 , 24, 0, 0
 
CmdDial 28, 60 , 24, 0, 0
Line 81: Line 81:
 
CmdDial 132, 60, 24, 0, &HAAAA
 
CmdDial 132, 60, 24, 0, &HAAAA
 
CmdText 132, 100, 26, OPT_CENTER, "66%"
 
CmdText 132, 100, 26, OPT_CENTER, "66%"
</source> pic3
+
</source> [[File:Clip0008.png|center|Clip0008.png]]
  
 
{{Languages}}
 
{{Languages}}
  
 
[[Category:FT800 Commands]]
 
[[Category:FT800 Commands]]

Latest revision as of 18:08, 12 December 2014

Contents

Action

Draw a rotary dial control.

 

 

Syntax

CmdDial x, y, r ,options, val

 

 

Remarks

x

x-coordinate of dial center, in pixels

y

y-coordinate of dial center, in pixels

r

radius of dial, in pixels

options

By default the dial is drawn with a 3D effect.

Options OPT_FLAT removes the 3D effect.

val

Specify the position of dial points by setting a value between 0 and 65535 inclusive.

0 means that the dial points straight down, &H4000 left, &H8000 up, and &Hc000 right.

 

 

Example

' Pseudocode
 
' A dial set to 50%
CmdDial 80, 60, 55, 0, &H8000
Clip0006.png
' Without the 3D look
CmdDial 80, 60, 55, OPT_FLAT, &H8000
Clip0007.png
' Dials set to 0%, 33% and 66%

CmdDial 28, 60 , 24, 0, 0 CmdText 28, 100, 26, OPT_CENTER, "0%" CmdDial 80, 60, 24, 0, &H5555 CmdText 80, 100, 26, OPT_CENTER, "33%" CmdDial 132, 60, 24, 0, &HAAAA

CmdText 132, 100, 26, OPT_CENTER, "66%"
Clip0008.png
Languages   English  
Personal tools
Namespaces
Variants
Actions
Navigation
Language