rbgooey 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +3 -1
- data/README +1 -1
- data/lib/text.rb +2 -2
- data/lib/textrender.rb +4 -5
- metadata +2 -2
data/CHANGES
CHANGED
data/README
CHANGED
data/lib/text.rb
CHANGED
|
@@ -37,8 +37,8 @@ class Text
|
|
|
37
37
|
end
|
|
38
38
|
#Text class required a font name to load and the normal size
|
|
39
39
|
def setup font , size
|
|
40
|
-
@font = font
|
|
41
|
-
|
|
40
|
+
@font = TTF.new("#{font}",size)
|
|
41
|
+
@size = size
|
|
42
42
|
end
|
|
43
43
|
#Assign certain code when a specific string collide.
|
|
44
44
|
def active &action
|
data/lib/textrender.rb
CHANGED
|
@@ -41,12 +41,11 @@ class TextRender
|
|
|
41
41
|
@ui.name[@ui.status][1].pop()
|
|
42
42
|
end
|
|
43
43
|
#Render the last string
|
|
44
|
-
def render x , y , bg = @ui.display.bg
|
|
44
|
+
def render x , y , bg = @ui.display.bg
|
|
45
45
|
compare(x,y)
|
|
46
46
|
default = nil
|
|
47
|
-
@
|
|
48
|
-
|
|
49
|
-
render = @font.render("#{@ui.string.last}",true,@ui.display.fg,bg)
|
|
47
|
+
@skip = @ui.text.font.line_skip()
|
|
48
|
+
render = @ui.text.font.render("#{@ui.string.last}",true,@ui.display.fg,bg)
|
|
50
49
|
render.blit(@ui.display.screen,[x,y+=@y_value])
|
|
51
50
|
@ui.name[@ui.status][1] << Rect.new(x,y,*render.size)
|
|
52
51
|
@y_value+= @skip
|
|
@@ -59,7 +58,7 @@ class TextRender
|
|
|
59
58
|
end
|
|
60
59
|
string = @ui.string[string]
|
|
61
60
|
if string != nil
|
|
62
|
-
render = @font.render("#{string}",true,@ui.display.fg,@ui.display.bg)
|
|
61
|
+
render = @ui.text.font.render("#{string}",true,@ui.display.fg,@ui.display.bg)
|
|
63
62
|
render.blit(@ui.display.screen,[rect[0],rect[1]])
|
|
64
63
|
end
|
|
65
64
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rbgooey
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Han Dao
|
|
@@ -9,7 +9,7 @@ autorequire: rbgooey.rb
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2008-07-
|
|
12
|
+
date: 2008-07-24 00:00:00 -04:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies: []
|
|
15
15
|
|