Skip to content

Commit

Permalink
Update for game
Browse files Browse the repository at this point in the history
  • Loading branch information
scotdalton committed Dec 13, 2013
1 parent 252ed5b commit 63ffeed
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions assignments/game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
width = 1150
Shoes.app width: width, height: 700, title: "Final" do
background darkgray

@game = Ceely::Gui::Game.new(self, {width: width, top: 180, left: 20, height: 700})
@game = Ceely::Gui::Game.new(self, { width: width })
end
2 changes: 1 addition & 1 deletion lib/ceely/gui/game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def keyboard
return @keyboard unless @keyboard.blank?
p level.name
@keyboard = Ceely::Gui::Keyboard.new(shoes, scale, 2,
{ width: width, top: top, left: left, height: height,
{ width: width, top: 180, left: 20, height: 465,
show_names: level.show_names?, press_keys: level.press_keys? })
@keyboard.click_callback = -> { judge }
@keyboard
Expand Down
2 changes: 1 addition & 1 deletion lib/ceely/gui/key.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def initialize(shoes, position, note, opts={}, shoe=nil)
if show_names?
first_rect = self.shoe.first
text_color = opts[:text_color]
text_left = first_rect.left + (first_rect.width/2 - 5)
text_left = first_rect.left + (first_rect.width/2 - 7)
text_top = top - 190
@names << shoes.para(note.name, { left: text_left, top: text_top,
stroke: text_color })
Expand Down
3 changes: 2 additions & 1 deletion spec/ceely/gui/game_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
require 'spec_helper'
module Ceely
module Gui
describe Ceely::Gui::Key do
describe Ceely::Gui::Game do
subject(:game) { Ceely::Gui::Game.new(fake_shoes, 0, c) }
end
end
end

0 comments on commit 63ffeed

Please sign in to comment.