wads 0.2.0 → 0.2.1

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: a1cf7ab7c4229f57f2bb4691819c5a4282a3fd0f7703e5caa6c93e49aeb35053
4
- data.tar.gz: a1f0e971db1ea5064e44fef39c31767125f844b8ab3ef87eeaf09e3e92f27ad1
3
+ metadata.gz: abb19e4e8651f417126dac1b5f6d684d366924f13596e220395fb2c5106b8912
4
+ data.tar.gz: e8e414d75ac5941bf934888ada51241a74728f186a6df60247f13499601e37cb
5
5
  SHA512:
6
- metadata.gz: 315790b3c8fe99525c3ad78eaa90eecd17fadd09a2a3e16a13ba82cb61ea5279472c57ada6e88021e9c6649236bb598aad0a46a1954928a1c37dc8dbf8b45b5e
7
- data.tar.gz: 89de4f997dcef2e1b9e25062af443d6994d7ee4070d89dab21f06cb492ed3d106f837a9c3bdf85d7ba7e6522d30a039694982d939d49dd41b7da30c2637299ea
6
+ metadata.gz: 94bf5046023232e7c4f9b46f7e8032c7c3ebd97ca9711a3423a3e20d42c23b1e3b39d3b8cd73dec4be8bc51c00bd685b41901fde8250576fffcba602cdf36b4b
7
+ data.tar.gz: 3c34a400278a5e2db1afb161bad83ac81375084f40c5928b63bdb6ddfc3446cbed7f7bdead0307c919612f515aedacc2ed7e02b61c5b3cf7b85766739772bcd3
data/lib/wads/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Wads
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
data/lib/wads/widgets.rb CHANGED
@@ -1406,9 +1406,11 @@ module Wads
1406
1406
  if id == Gosu::MsLeft
1407
1407
  # Special handling for text input fields
1408
1408
  # Mouse click: Select text field based on mouse position.
1409
- WadsConfig.instance.get_window.text_input = @text_input_fields.find { |tf| tf.under_point?(mouse_x, mouse_y) }
1410
- # Advanced: Move caret to clicked position
1411
- WadsConfig.instance.get_window.text_input.move_caret(mouse_x) unless WadsConfig.instance.get_window.text_input.nil?
1409
+ if not @text_input_fields.empty?
1410
+ WadsConfig.instance.get_window.text_input = @text_input_fields.find { |tf| tf.under_point?(mouse_x, mouse_y) }
1411
+ # Advanced: Move caret to clicked position
1412
+ WadsConfig.instance.get_window.text_input.move_caret(mouse_x) unless WadsConfig.instance.get_window.text_input.nil?
1413
+ end
1412
1414
 
1413
1415
  result = handle_mouse_down mouse_x, mouse_y
1414
1416
  elsif id == Gosu::MsRight
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wads
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - dbroemme