Paste: My first Factor UI program. :D

Author: Rayne
Mode: factor
Date: Fri, 24 Jul 2009 01:59:56
Plain Text |
USING: kernel io ui ui.gadgets.labels ui.gadgets.buttons ui.gadgets
       ui.gadgets.packs ui.gadgets.borders accessors ;
IN: uilearn

: okaywindow ( -- )
    <filled-pile> { 2 2 } >>gap
    "Seth likes the cock. Click Okay to continue." <label> add-gadget
    "Okay" [ close-window ] <border-button> add-gadget
    "Seriously." open-window ;

: create-button ( -- button )
    "Do Magic" [ drop okaywindow ] <border-button> ;

: main ( -- )
    [
        <filled-pile> { 2 2 } >>gap
        "Click below to do magic :>" <label> add-gadget
        create-button add-gadget
        { 30 30 } <border>
        "Hi Seth" open-window
    ] with-ui ;

MAIN: main

New Annotation

Summary:
Author:
Mode:
Body: