fix sdl console

cvs
Mackenzie Straight 2005-02-07 14:20:10 +00:00
parent 2b225a6c7b
commit 700c4d8e17
1 changed files with 5 additions and 4 deletions

View File

@ -64,6 +64,7 @@ USE: line-editor
USE: hashtables USE: hashtables
USE: lists USE: lists
USE: sdl-ttf USE: sdl-ttf
USE: prettyprint
#! A namespace holding console state. #! A namespace holding console state.
SYMBOL: console SYMBOL: console
@ -121,11 +122,11 @@ SYMBOL: redraw-console
: draw-line ( str -- ) : draw-line ( str -- )
>r x get y get console-font get r> >r x get y get console-font get r>
foreground make-color draw-string foreground 3unlist make-color draw-string
x [ + ] change ; x [ + ] change ;
: clear-display ( -- ) : clear-display ( -- )
surface get 0 0 width get height get background 3list rgb boxColor ; surface get 0 0 width get height get background rgb boxColor ;
: draw-lines ( -- ) : draw-lines ( -- )
visible-lines available-lines min [ visible-lines available-lines min [
@ -142,7 +143,7 @@ SYMBOL: redraw-console
y get y get
over 1 + over 1 +
y get line-height get + y get line-height get +
cursor 3list rgb boxColor ; cursor rgb boxColor ;
: draw-current ( -- ) : draw-current ( -- )
output-line get sbuf>str draw-line ; output-line get sbuf>str draw-line ;
@ -169,7 +170,7 @@ SYMBOL: redraw-console
scrollbar-top scrollbar-top
width get width get
scrollbar-bottom scrollbar-bottom
black 3list rgb boxColor ; black rgb boxColor ;
: draw-console ( -- ) : draw-console ( -- )
[ [