2005-05-03 19:10:20 -04:00
|
|
|
! Copyright (C) 2005 Slava Pestov.
|
|
|
|
! See http://factor.sf.net/license.txt for BSD license.
|
|
|
|
IN: gadgets
|
2005-10-14 04:05:02 -04:00
|
|
|
USING: errors freetype gadgets-layouts gadgets-listener
|
|
|
|
gadgets-theme generic help io kernel listener lists math memory
|
|
|
|
namespaces opengl prettyprint sdl sequences shells styles
|
|
|
|
threads words ;
|
2005-07-20 00:28:07 -04:00
|
|
|
|
|
|
|
SYMBOL: first-time
|
|
|
|
|
2005-10-08 01:15:14 -04:00
|
|
|
global [ first-time on ] bind
|
2005-05-03 19:10:20 -04:00
|
|
|
|
2005-10-14 04:05:02 -04:00
|
|
|
: init-world ( -- )
|
2005-10-08 01:15:14 -04:00
|
|
|
global [
|
2005-10-14 04:05:02 -04:00
|
|
|
first-time get [
|
|
|
|
<world> world set
|
|
|
|
world get solid-interior
|
2005-12-22 18:38:10 -05:00
|
|
|
{ 600 700 0 } world get set-gadget-dim
|
2005-10-14 04:05:02 -04:00
|
|
|
<hand> hand set
|
|
|
|
first-time off
|
|
|
|
] when
|
2005-10-08 01:15:14 -04:00
|
|
|
] bind ;
|
2005-08-26 00:55:56 -04:00
|
|
|
|
2005-09-03 22:28:46 -04:00
|
|
|
IN: shells
|
|
|
|
|
2005-05-03 19:10:20 -04:00
|
|
|
: ui ( -- )
|
2006-01-20 01:26:50 -05:00
|
|
|
[
|
2006-01-07 17:05:59 -05:00
|
|
|
init-world world get rect-dim first2
|
2005-10-28 15:37:28 -04:00
|
|
|
[ listener-application run-world ] with-gl-screen
|
2005-10-14 04:05:02 -04:00
|
|
|
] with-freetype ;
|
2006-01-08 20:41:31 -05:00
|
|
|
|
|
|
|
IN: gadgets
|
|
|
|
|
|
|
|
: ui* [ ui ] in-thread ;
|