From 717cba001ca7717f5622abfe51def9f66e868f1e Mon Sep 17 00:00:00 2001 From: slava Date: Sun, 2 Apr 2006 00:51:48 +0000 Subject: [PATCH] UI tweaks --- library/ui/labels.factor | 3 +-- library/ui/world.factor | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/library/ui/labels.factor b/library/ui/labels.factor index 366eed992a..5aeac166a2 100644 --- a/library/ui/labels.factor +++ b/library/ui/labels.factor @@ -27,7 +27,6 @@ M: label pref-dim* ( label -- dim ) label-size ; : draw-label ( label -- ) dup label-color gl-color - dup label-font* dup world get font-sprites rot - label-text draw-string ; + dup label-font* swap label-text draw-string ; M: label draw-gadget* ( label -- ) draw-label ; diff --git a/library/ui/world.factor b/library/ui/world.factor index 62d4e45f80..3e0f3edcac 100644 --- a/library/ui/world.factor +++ b/library/ui/world.factor @@ -45,3 +45,6 @@ M: world pref-dim* ( world -- dim ) : focused-ancestors ( world -- seq ) world-focus parents reverse-slice ; + +: draw-string ( open-fonts string -- ) + >r dup world get font-sprites r> (draw-string) ;