Shop OBEX P1 Docs P2 Docs Learn Events
Propeller BackPack constants — Parallax Forums

Propeller BackPack constants

TumblerTumbler Posts: 323
edited 2010-08-15 22:59 in Propeller 1
In the bp_tv_overlay pdf, i see some presets for a window. (about 10) But they i can't find them all in the constants list.

Wich constant i have to add for a time/date preset window? (using a BS2)

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-15 12:50
    Tumbler,

    Here are the values of those constants, as defined in the overlay object:
      BIGWIN        = $01           '40 x 13 regular window.
      CREDITS       = $02           'Vertically overscanned window with smooth scrolling.
      MARQUEE       = $03           'Single row at bottom with smooth scrolling.
      HILO          = $04           'Single rows top and bottom.
      HILO2         = $05           'Dual rows top and bottom.
      DATETIME      = $06           'Date and time in lower right-hand corner.
      HIDATTIM      = $07           'Same as DATETIME with message row along top.
      CROSS         = $08           'Single cross-shaped cursor in middle of 40 x 13 screen.
      BOX           = $09           'Single box-shaped cursor in middle of 40 x 13 screen.
      DOT           = $0A           'Single dot cursor in middle of 40 x 13 screen.
    
    -Phil
  • TumblerTumbler Posts: 323
    edited 2010-08-15 21:42
    Thx Phil,

    I couldn't find them in the pdf or in the pbasic program.
    As you can see, there is a typo on page 20
    BIGWIN = $01 '40 x 13 regular window.
    CREDITS = $02 'Vertically overscanned window with smooth scrolling.
    MARQUEE = $03 'Single row at bottom with smooth scrolling.
    HILO = $04 'Single rows top and bottom.
    HILO2 = $05 'Dual rows top and bottom.
    CROSS = $06 'Single cross-shaped cursor in middle of 40 x 13 screen.
    BOX = $07 'Single box-shaped cursor in middle of 40 x 13 screen.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-15 22:59
    Oh, you're right. I'll need to fix that. Meanwhile, here's the corrected version of the entire command list:
      'Commands recognized by "out" method.
    
      CLS           = $00           '( ) Clear the current window, and home cursor.
      HOME          = $01           '( ) Move cursor to home position.
      CRSRXY        = $02           '(col,row) Move cursor to col and row.
      CRSRLF        = $03           '( ) Move cursor to the left.
      CRSRRT        = $04           '( ) Move cursor to the right.
      CRSRUP        = $05           '( ) Move cursor up.
      CRSRDN        = $06           '( ) Move cursor down.
      SHODSP        = $07           '(dispno) Show display number dispno.
      BKSP          = $08           '( ) Erase prior character and move cursor left.
      TAB           = $09           '( ) Move cursor right to next column divisible by 8.
      LF            = $0A           '( ) Linefeed. Scroll up if on bottom line.
      CLREOL        = $0B           '( ) Clear to the end of the current line.
      CLRDN         = $0C           '( ) Clear from cursor position to the end of the window.
      CR            = $0D           '( )Carriage return. Scroll up if necessary.
      CRSRX         = $0E           '(col) Move cursor to column col.
      CRSRY         = $0F           '(row) Move cursor to row.
      DEFWIN        = $10           '(winno,cols,rows) Define a new window winno sized cols x rows. Make it the current window.
      USEWIN        = $11           '(winno) Change the current window to winno.
      CHGCLR        = $12           '(mask,transparent,fgnd,bkgd) Change current window color to mask, transparent, fgnd, and bkgd.
      SCROLL        = $13           '(offset) Set X (one-line) or Y (multi-line) scroll offset (0 - 15) for current window.
      SMSCRL        = $14           '(rate) Set smooth scrolling rate in current window to rate ms/scan line.
      WDWRAP        = $15           '(yn) Set word wrapping for current window: on (yn<>0) or off (yn==0).
      BLINK         = $16           '(yn) Set blinking for current window: on (yn<>0) or off (yn==0).
      CPYWIN        = $17           '(winno) Copy contents of winno to current window.
      APNDSP        = $18           '(disp,winno,x,y) Append window winno to display disp at location (x,y).
      MOVWIN        = $19           '(slot,x,y) Move window in slot to (x,y).
      SHOWIN        = $1A           '(slot,yn) Show window in slot: yes (yn<>0) or no (yn==0).
      CHGWIN        = $1B           '(slot,winno) Change window in slot to winno.
      PRESET        = $1C           '(dispno,presetno) Create display dispno using preset presetno.
      SETTIM        = $1D           '(yr,mo,day,hr,min,sec) Set the current time.
    
      MARK          = $1E           '( )Return MARK to acknowledge reaching this point.
      ESC           = $1F           '(char) Escape next character char (i.e. print as-is).
    
      CLRWIN        = $FF           '( )Same as CLS where strings do not permit 0.
      NONE          = $FF
      ZERO          = $FF           'Same as 0 when used as an argument.
      _0            = $FF
      NO            = $FF
      YES           = $01
    
      DBL           = $80           'OR with height and width arguments to get double-sized characters.
      SHO           = $40           'OR with window number to set visibility on.
    
      'Preset names.
    
      BIGWIN        = $01           '40 x 13 regular window.
      CREDITS       = $02           'Vertically overscanned window with smooth scrolling.
      MARQUEE       = $03           'Single row at bottom with smooth scrolling.
      HILO          = $04           'Single rows top and bottom.
      HILO2         = $05           'Dual rows top and bottom.
      DATETIME      = $06           'Date and time in lower right-hand corner.
      HIDATTIM      = $07           'Same as DATETIME with message row along top.
      CROSS         = $08           'Single cross-shaped cursor in middle of 40 x 13 screen.
      BOX           = $09           'Single box-shaped cursor in middle of 40 x 13 screen.
      DOT           = $0A           'Single dot cursor in middle of 40 x 13 screen.
    
      ' Window type names.
    
      REGWIN        = 0             'Regular window.
      HMS24         = 1             'Time window: [ 23:59:59 ]
      HMS12         = 2             'Time window: [12:59:59pm]
      YMD           = 3             'Date window: [2099-12-31]
      MDY           = 4             'Date window: [12/31/2099]
      DMY           = 5             'Date window: [31-12-2099]
      YMDHMS24      = 6             'Date/time window: [2099-12-31 23:59:59]
      MDYHMS12      = 7             'Date/time window: [12/31/2099 12:59:59pm]
      DMYHMS12      = 8             'Date/time window: [31-12-2099 12:59:59pm]
    
    
    Thanks for the heads up!

    -Phil
Sign In or Register to comment.