wads 0.2.3 → 0.2.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d09e80867e43c756f3f39c4e56e0559578b58b289914fffbd4c085db10e58cff
4
- data.tar.gz: 6acffd90dcf53460d36cb8f3c20687740a2f8892a5fc14313530fda6deb88191
3
+ metadata.gz: d4dcddbd32da59c1cd1a89fc9abb27b69314b63fcb413753d874140d34db6d5d
4
+ data.tar.gz: ab05677ab411b91457d17e3acdfa7b6547268af9e42d7364573fed177b989316
5
5
  SHA512:
6
- metadata.gz: 395234eb8cffb136c2d2331b2fa844feff4c0056e2a5c720e18367f340a26472f26b08abd34c57d858d48da73ee107f89b8554106534b357910300fbe426b299
7
- data.tar.gz: 3e50d54e3b85b2f5cdf1336d27a68126c7ec3a1ebb45d2e39e4bb34a0b1296ba2acd902f04ce2e9b2ac39a46594e1baf86351c5232cf97177b9b223a3eed0ffa
6
+ metadata.gz: 67fb8ee6765014d4704d22cdb251595839f7b22593723204c198a85d943c59a80d37823eaec65aee58bb81177feb03c7fd92e831ada1c08e0cdb1d804a1e69e4
7
+ data.tar.gz: 3290687b9372191b80690d42f9ef825716898b3e2c123b0bee9ee8e72b630680320279a1a302d06b27f8aaf696dd2b406d13621e2b9a44f835eb230c12460bda
data/CHANGELOG.md CHANGED
@@ -21,3 +21,8 @@
21
21
  ## [0.2.3] - 2021-10-21
22
22
 
23
23
  - Upgrade dependency versions
24
+
25
+ ## [0.2.4] - 2021-10-21
26
+
27
+ - Add a callback for key up
28
+
data/lib/wads/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Wads
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
data/lib/wads/widgets.rb CHANGED
@@ -1454,6 +1454,11 @@ module Wads
1454
1454
  if not result.nil? and result.is_a? WidgetResult
1455
1455
  return result
1456
1456
  end
1457
+ else
1458
+ result = handle_key_up id, mouse_x, mouse_y
1459
+ if not result.nil? and result.is_a? WidgetResult
1460
+ return result
1461
+ end
1457
1462
  end
1458
1463
 
1459
1464
  @children.each do |child|
@@ -1464,6 +1469,11 @@ module Wads
1464
1469
  return result
1465
1470
  end
1466
1471
  end
1472
+ else
1473
+ result = handle_key_up id, mouse_x, mouse_y
1474
+ if not result.nil? and result.is_a? WidgetResult
1475
+ return result
1476
+ end
1467
1477
  end
1468
1478
  end
1469
1479
  end
@@ -1706,6 +1716,17 @@ module Wads
1706
1716
  # empty base implementation
1707
1717
  end
1708
1718
 
1719
+ #
1720
+ # Override this method in your subclass to process when a key is released.
1721
+ # The base implementation is empty.
1722
+ # Note that the mouse was not necessarily positioned over this widget.
1723
+ # You can check this using the contains_click(mouse_x, mouse_y) method
1724
+ # and decide if you want to process the event based on that, if desired.
1725
+ #
1726
+ def handle_key_up id, mouse_x, mouse_y
1727
+ # empty base implementation
1728
+ end
1729
+
1709
1730
  #
1710
1731
  # Override this method in your subclass to perform any logic needed
1711
1732
  # as part of the main Gosu update loop. In most cases, this method is
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wads
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - dbroemme
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-20 00:00:00.000000000 Z
11
+ date: 2021-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gosu