fix solid boundary
parent
a827a56c15
commit
5672173256
|
@ -1,16 +1,14 @@
|
||||||
0.79:
|
0.79:
|
||||||
|
|
||||||
- tutorial gradient does not appear
|
|
||||||
- sig11 on first startup
|
- sig11 on first startup
|
||||||
- fix initial font metrics being incorrect
|
- fix initial font metrics being incorrect
|
||||||
- fix solid boundary paint
|
|
||||||
- investigate UI on Linux/x86
|
|
||||||
- swap @{ and { syntax
|
- swap @{ and { syntax
|
||||||
- get stuff in examples dir running in the ui
|
- get stuff in examples dir running in the ui
|
||||||
- [ ... is annoying
|
- [ ... is annoying
|
||||||
perhaps on the last line of output, if a block doesn't fit, print
|
perhaps on the last line of output, if a block doesn't fit, print
|
||||||
it anyway?
|
it anyway?
|
||||||
- apropos: use new smarter completion?
|
- apropos: use new smarter completion?
|
||||||
|
- fix buttons
|
||||||
|
|
||||||
+ ui:
|
+ ui:
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,8 @@ namespaces sdl sequences strings styles ;
|
||||||
<gadget>
|
<gadget>
|
||||||
dup << gradient f @{ @{ 64 64 64 }@ @{ 255 255 255 }@ }@ >>
|
dup << gradient f @{ @{ 64 64 64 }@ @{ 255 255 255 }@ }@ >>
|
||||||
interior set-paint-prop
|
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 )
|
GENERIC: tutorial-line ( object -- gadget )
|
||||||
|
|
||||||
|
@ -28,8 +29,16 @@ M: string tutorial-line
|
||||||
M: general-list tutorial-line
|
M: general-list tutorial-line
|
||||||
car <input-button> dup example-theme ;
|
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 )
|
: <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
|
: 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 -- browser )
|
||||||
tutorial-pages [ <page> ] map <book>
|
tutorial-pages [ <page> ] map <book> <book-browser> ;
|
||||||
dup tutorial-theme <book-browser> ;
|
|
||||||
|
|
||||||
: tutorial ( -- )
|
: tutorial ( -- )
|
||||||
<tutorial> gadget. ;
|
<tutorial> gadget. ;
|
||||||
|
|
|
@ -70,7 +70,10 @@ USING: alien errors kernel math namespaces opengl sdl sequences ;
|
||||||
|
|
||||||
: gl-rect ( dim -- )
|
: gl-rect ( dim -- )
|
||||||
#! Draws a two-dimensional box.
|
#! 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 ;
|
: (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_POLYGON (gl-poly) ;
|
||||||
|
|
||||||
: gl-poly ( points { r g b } -- )
|
: gl-poly ( points { r g b } -- )
|
||||||
#! Draw a filled polygon.
|
#! Draw a polygon.
|
||||||
GL_LINE_LOOP (gl-poly) ;
|
GL_LINE_LOOP (gl-poly) ;
|
||||||
|
|
||||||
: do-matrix ( mode quot -- )
|
: do-matrix ( mode quot -- )
|
||||||
swap glMatrixMode glPushMatrix call glPopMatrix ; inline
|
swap glMatrixMode glPushMatrix call glPopMatrix ; inline
|
||||||
|
|
||||||
: gl-set-clip ( loc dim -- )
|
: gl-set-clip ( loc dim -- )
|
||||||
dup first2 1+ >r >r
|
dup first2 ( 1+ ) >r >r
|
||||||
over second swap second + height get swap - >r
|
over second swap second + height get swap - >r
|
||||||
first r> r> r> glScissor ;
|
first r> r> r> glScissor ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue