fix solid boundary

cvs
Slava Pestov 2005-10-25 05:31:54 +00:00
parent a827a56c15
commit 5672173256
3 changed files with 19 additions and 17 deletions

View File

@ -1,16 +1,14 @@
0.79:
- tutorial gradient does not appear
- sig11 on first startup
- fix initial font metrics being incorrect
- fix solid boundary paint
- investigate UI on Linux/x86
- swap @{ and { syntax
- get stuff in examples dir running in the ui
- [ ... is annoying
perhaps on the last line of output, if a block doesn't fit, print
it anyway?
- apropos: use new smarter completion?
- fix buttons
+ ui:

View File

@ -11,7 +11,8 @@ namespaces sdl sequences strings styles ;
<gadget>
dup << gradient f @{ @{ 64 64 64 }@ @{ 255 255 255 }@ }@ >>
interior set-paint-prop
@{ 0 10 0 }@ over set-gadget-dim ;
@{ 0 10 0 }@ over set-gadget-dim
@{ 1 0 0 }@ over set-gadget-orientation ;
GENERIC: tutorial-line ( object -- gadget )
@ -28,8 +29,16 @@ M: string tutorial-line
M: general-list tutorial-line
car <input-button> dup example-theme ;
: page-theme
dup @{ 204 204 255 }@ background set-paint-prop
dup << gradient f @{ @{ 204 204 255 }@ @{ 255 204 255 }@ }@ >>
interior set-paint-prop
dup "Sans Serif" font set-paint-prop
16 font-size set-paint-prop ;
: <page> ( list -- gadget )
[ tutorial-line ] map make-pile 1 over set-pack-fill <border> ;
[ tutorial-line ] map make-pile 1 over set-pack-fill
dup page-theme <border> ;
: tutorial-pages
{
@ -356,16 +365,8 @@ M: general-list tutorial-line
}
} ;
: tutorial-theme
dup @{ 204 204 255 }@ background set-paint-prop
dup << gradient f @{ @{ 204 204 255 }@ @{ 255 204 255 }@ }@ >>
interior set-paint-prop
dup "Sans Serif" font set-paint-prop
16 font-size set-paint-prop ;
: <tutorial> ( pages -- browser )
tutorial-pages [ <page> ] map <book>
dup tutorial-theme <book-browser> ;
tutorial-pages [ <page> ] map <book> <book-browser> ;
: tutorial ( -- )
<tutorial> gadget. ;

View File

@ -70,7 +70,10 @@ USING: alien errors kernel math namespaces opengl sdl sequences ;
: gl-rect ( dim -- )
#! Draws a two-dimensional box.
GL_LINE_LOOP [ four-sides ] do-state ;
GL_MODELVIEW [
0.5 0.5 0 glTranslatef @{ 1 1 0 }@ v-
GL_LINE_STRIP [ dup four-sides top-left ] do-state
] do-matrix ;
: (gl-poly) [ [ gl-vertex ] each ] do-state ;
@ -79,14 +82,14 @@ USING: alien errors kernel math namespaces opengl sdl sequences ;
GL_POLYGON (gl-poly) ;
: gl-poly ( points { r g b } -- )
#! Draw a filled polygon.
#! Draw a polygon.
GL_LINE_LOOP (gl-poly) ;
: do-matrix ( mode quot -- )
swap glMatrixMode glPushMatrix call glPopMatrix ; inline
: gl-set-clip ( loc dim -- )
dup first2 1+ >r >r
dup first2 ( 1+ ) >r >r
over second swap second + height get swap - >r
first r> r> r> glScissor ;