… | |
… | |
129 | # width => $surface->width, |
129 | # width => $surface->width, |
130 | # height => $surface->height, |
130 | # height => $surface->height, |
131 | # ) |
131 | # ) |
132 | #} |
132 | #} |
133 | |
133 | |
134 | sub new_from_text { |
134 | sub new_from_layout { |
135 | my ($class, $text, $height) = @_; |
135 | my ($class, $layout) = @_; |
136 | |
136 | |
137 | my ($w, $h, $data) = Crossfire::Client::font_render $text, $height; |
137 | my ($w, $h, $data) = $layout->render; |
138 | |
138 | |
139 | $class->new ( |
139 | $class->new ( |
140 | width => $w, |
140 | width => $w, |
141 | height => $h, |
141 | height => $h, |
142 | data => $data, |
142 | data => $data, |