Skip to content

Commit

Permalink
Updated to work with LOVE0.7.2 and the new font origin.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Blodget committed Jul 14, 2011
1 parent 8b3735e commit 8d13a79
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 20 deletions.
13 changes: 7 additions & 6 deletions README.txt
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ found anything I like as well.

Installation:

To use Love To Type you must first install LÖVE 0.6.2.
Downloads for Mac, Linux and Windows are available at
http://love2d.org/. After LÖVE 0.6.2 has been installed
you can download the latest version of the
The latest versions of LoveToType require LÖVE 0.7.2.
(Version 0.5 and earlier required LÖVE 0.6.2.) LÖVE
0.7.2 downloads for Mac, Linux and Windows are available
at http://love2d.org/. After LÖVE 0.7.2 has been
installed you can download the latest version of the
LoveToType.love file from the the download link at
http://github.com/bblodget/LoveToType/. Once the file
had been downloaded, simply double-click it to run it.
http://github.com/bblodget/LoveToType/. Once the file had
been downloaded, simply double-click it to run it.

License:

Expand Down
5 changes: 3 additions & 2 deletions button.lua
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
-----------------------
-- For use in Love To Type
-- Modified: 10/17/2010 by Brandon Blodget
-- Copyright 2010 Brandon Blodget
-- Modified: 7/13/2011 by Brandon Blodget
-- Copyright 2010, 2011 Brandon Blodget
-- License: GPL v3 or later
-----------------------
-- Handles buttons and such.
Expand Down Expand Up @@ -68,7 +69,7 @@ function Button:draw()
else
love.graphics.setColor(unpack(color.black))
end
love.graphics.print(self.text, self.x, self.y)
love.graphics.print(self.text, self.x, self.y - self.height)
elseif (self.btype == "image") then
love.graphics.setColor(unpack(color.overlay))
love.graphics.draw(self.image, self.x, self.y)
Expand Down
6 changes: 3 additions & 3 deletions conf.lua
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- conf.lua
--
-- Copyright 2010 Brandon Blodget
-- Copyright 2010, 2011 Brandon Blodget
--
-- This file is part of "Love To Type."
--
Expand All @@ -18,10 +18,10 @@
-- along with "Love To Type". If not, see <http://www.gnu.org/licenses/>.

function love.conf(t)
t.title = "Love To Type version 0.4"
t.title = "LoveToType verion 0.6 -- requires LOVE 0.7.2"
t.author = "Brandon Blodget"
t.screen.width = 800
t.screen.height = 600
t.version = 0.62 -- required love version.
t.version = 072 -- required love version.
end

16 changes: 9 additions & 7 deletions game.lua
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ function Game.create(data)

self.y1 = 100
self.y2 = 250

self.game_over = false
self.line_count = 0 -- count of how many lines the plane has flown over

Expand All @@ -87,12 +88,12 @@ function Game.create(data)
}

self.words = {
{ word = "", line=1, x=200, y=self.y1+30, state="none"},
{ word = "", line=1, x=400, y=self.y1+55, state="none"},
{ word = "", line=1, x=600, y=self.y1+80, state="none"},
{ word = "", line=2, x=200, y=self.y2+30, state="none"},
{ word = "", line=2, x=400, y=self.y2+55, state="none"},
{ word = "", line=2, x=600, y=self.y2+80, state="none"}
{ word = "", line=1, x=200, y=self.y1+0, state="none"},
{ word = "", line=1, x=400, y=self.y1+30, state="none"},
{ word = "", line=1, x=600, y=self.y1+55, state="none"},
{ word = "", line=2, x=200, y=self.y2+0, state="none"},
{ word = "", line=2, x=400, y=self.y2+30, state="none"},
{ word = "", line=2, x=600, y=self.y2+55, state="none"}
}

love.graphics.setBackgroundColor(unpack(color.light_blue))
Expand Down Expand Up @@ -151,7 +152,8 @@ function Game:initBox()
self.rw = font.large:getWidth(max_str)
self.rh = font.large:getHeight() * 2
self.rx = 400 - (self.rw/2)
self.ry = 500 - (self.rh / 1.5)
-- self.ry = 500 - (self.rh / 1.5)
self.ry = 500 - (self.rh / 4)

end

Expand Down
5 changes: 4 additions & 1 deletion letters.lua
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ function Letters:draw()
local by = 125
local bs = 50

--local lx = bx - (self.l_width/2) + (bs/2)
--local ly = by + (self.l_height/2) + (bs/2) - 5

local lx = bx - (self.l_width/2) + (bs/2)
local ly = by + (self.l_height/2) + (bs/2) - 5
local ly = by


love.graphics.rectangle( "line", bx, by, bs, bs )
Expand Down
2 changes: 1 addition & 1 deletion title.lua
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
------------------------------------------------------------------------
-- title.lua
--
-- Copyright 2010 Brandon Blodget
-- Copyright 2010, 2011 Brandon Blodget
--
-- This file is part of "Love To Type."
--
Expand Down

0 comments on commit 8d13a79

Please sign in to comment.