chingu 0.7.7 → 0.7.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/chingu.gemspec +2 -2
- data/lib/chingu.rb +1 -1
- data/lib/chingu/game_states/edit.rb +4 -2
- data/lib/chingu/helpers/input_dispatcher.rb +2 -0
- metadata +5 -4
data/chingu.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{chingu}
|
8
|
-
s.version = "0.7.7"
|
8
|
+
s.version = "0.7.7.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["ippa"]
|
12
|
-
s.date = %q{2010-08-
|
12
|
+
s.date = %q{2010-08-20}
|
13
13
|
s.description = %q{OpenGL accelerated 2D game framework for Ruby. Builds on Gosu (Ruby/C++) which provides all the core functionality. Chingu adds simple yet powerful game states, prettier input handling, deployment safe asset-handling, a basic re-usable game object and stackable game logic.}
|
14
14
|
s.email = %q{ippa@rubylicio.us}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/chingu.rb
CHANGED
@@ -224,7 +224,7 @@ END_OF_STRING
|
|
224
224
|
# SETUP
|
225
225
|
#
|
226
226
|
def setup
|
227
|
-
@scroll_border_thickness =
|
227
|
+
@scroll_border_thickness = 30
|
228
228
|
@file = options[:file] || previous_game_state.filename + ".yml"
|
229
229
|
@title = Text.create("File: #{@file}", :x => 5, :y => 2, :factor => 1, :size => 16, :zorder => @zorder)
|
230
230
|
@title.text += " - Grid: #{@grid}" if @grid
|
@@ -253,7 +253,7 @@ END_OF_STRING
|
|
253
253
|
if s = @selected_game_object
|
254
254
|
@text.text = "#{s.class.to_s} @ #{s.x.to_i} / #{s.y.to_i}"
|
255
255
|
@text.text = "Size: #{s.width.to_i} x #{s.height.to_i} Ratio: #{sprintf("%.2f",s.width/s.height)}"
|
256
|
-
@text.text += " [Scale: #{sprintf("%.2f", s.factor_x)}/#{sprintf("%.2f", s.factor_y)} Angle: #{s.angle.to_i} Z: #{s.zorder}]"
|
256
|
+
@text.text += " [Scale: #{sprintf("%.2f", s.factor_x)}/#{sprintf("%.2f", s.factor_y)} Angle: #{s.angle.to_i} Z: #{s.zorder} Alpha: #{s.alpha}]"
|
257
257
|
end
|
258
258
|
|
259
259
|
#
|
@@ -490,6 +490,8 @@ END_OF_STRING
|
|
490
490
|
# draw a simple triangle-shaped cursor
|
491
491
|
#
|
492
492
|
def draw_cursor_at(x, y, c = Color::WHITE)
|
493
|
+
c2 = Color::BLACK
|
494
|
+
$window.draw_triangle(x-2, y-4, c2, x-2, y+12, c2, x+14, y+12, c2, @zorder + 5)
|
493
495
|
$window.draw_triangle(x, y, c, x, y+10, c, x+10, y+10, c, @zorder + 10)
|
494
496
|
end
|
495
497
|
|
@@ -40,6 +40,7 @@ module Chingu
|
|
40
40
|
|
41
41
|
# Dispatch button press to one of your clients.
|
42
42
|
def dispatch_button_down(id, object)
|
43
|
+
return unless Input::CONSTANT_TO_SYMBOL[id]
|
43
44
|
if actions = object.input[Input::CONSTANT_TO_SYMBOL[id].first]
|
44
45
|
dispatch_actions(actions)
|
45
46
|
end
|
@@ -47,6 +48,7 @@ module Chingu
|
|
47
48
|
|
48
49
|
# Dispatch button release to one of your clients.
|
49
50
|
def dispatch_button_up(id, object)
|
51
|
+
return unless Input::CONSTANT_TO_SYMBOL[id]
|
50
52
|
if actions = object.input[:"released_#{Input::CONSTANT_TO_SYMBOL[id].first}"]
|
51
53
|
dispatch_actions(actions)
|
52
54
|
end
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chingu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 105
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
9
|
- 7
|
10
|
-
|
10
|
+
- 1
|
11
|
+
version: 0.7.7.1
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- ippa
|
@@ -15,7 +16,7 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2010-08-
|
19
|
+
date: 2010-08-20 00:00:00 +02:00
|
19
20
|
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
@@ -42,7 +43,7 @@ dependencies:
|
|
42
43
|
requirements:
|
43
44
|
- - ">="
|
44
45
|
- !ruby/object:Gem::Version
|
45
|
-
hash: -
|
46
|
+
hash: -784023276
|
46
47
|
segments:
|
47
48
|
- 2
|
48
49
|
- 0
|