ConsoleGL 1.0.7 → 1.1.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/consolegl.rb +18 -5
  3. metadata +6 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0eadad828aad5eaf43fac84c5545567b9f952b1c0490bedf0e1e372b8c8f508
4
- data.tar.gz: 0a25eec871e32adf6eaa9ef684e6644bffba2ec8c603001bdfa81e09aa94f45e
3
+ metadata.gz: c3f77745356bb2ae76c2b987d6672f356d93df2dd0bb44db87489ecd06c2b1c0
4
+ data.tar.gz: 116cd1f2b00074f03750041a484c8d98322856e5fca416d9844d4de35cd2b63c
5
5
  SHA512:
6
- metadata.gz: cfc80b6836b169a6ad68cab968bb4ff4ca2a6e0db6815a881c0a5a7e009fccda1ad8dbb1a844828f8beda5b96ebcf0562ad7c2d3a17d859f97285de490b83f6b
7
- data.tar.gz: 4516410ab0ea666fcf622d363d3d323072f4604287dce71665f0c15dd7e3e9ef972e8e852544364e1718805c0e869db6af20b24e28022e39dc6b0bcb41a62230
6
+ metadata.gz: bf1e1b64abbbdd64b5ba7762d60dbaa07613901d6147daf0181eb7688bc83345bfaaf8680c931ea39e50f5d761535d72297a852d90b0491cb9f1278b03b25441
7
+ data.tar.gz: 23164d59d5add7a195340914f1970c3e2fa1565aa0511817f87498caacd296e865e14cb645d56c00a1f5a22bd57ace046fac6618567d100f6418b213e7338b63
@@ -23,6 +23,19 @@
23
23
  #Color = COLOR ID
24
24
  #Usage:
25
25
  #LineVertical(Color.BLUE)
26
+ require 'io/console'
27
+
28
+ class Input
29
+ def self.KeyPressed(key)
30
+ ch = STDIN.getch
31
+ if ch.to_s == key
32
+ return true
33
+ else
34
+ return false
35
+ end
36
+ end
37
+ end
38
+
26
39
 
27
40
 
28
41
  class Color
@@ -50,13 +63,11 @@ class Color
50
63
  end
51
64
 
52
65
  def self.WHITE
53
- return false
66
+ return 0
54
67
  end
55
68
 
56
-
57
69
  end
58
70
 
59
-
60
71
  class Console
61
72
  ## COLOR ##
62
73
 
@@ -148,11 +159,13 @@ class Console
148
159
 
149
160
 
150
161
 
151
- def SetConsoleColor(value)
162
+ def self.SetConsoleColor(value)
152
163
  system "COLOR " + value.to_s
153
164
  end
154
165
 
155
- def ResetConsoleColor()
166
+ def self.ResetConsoleColor()
156
167
  system "COLOR 07"
157
168
  end
169
+
170
+
158
171
  end
metadata CHANGED
@@ -1,24 +1,25 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ConsoleGL
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Okistuff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-16 00:00:00.000000000 Z
11
+ date: 2020-07-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Rendering Engine for Ruby kind of similar to OpenGL. It runs in the
14
- console: 1.0.7 Updates: Added Color Support'
14
+ console: 1.1.1 Updates: Fixed Keyboard Input. Please see the wiki on the github
15
+ repo to learn how to use it'
15
16
  email: okistuffyt@gmail.com
16
17
  executables: []
17
18
  extensions: []
18
19
  extra_rdoc_files: []
19
20
  files:
20
21
  - lib/consolegl.rb
21
- homepage: https://rubygems.org/gems/ConsoleGL
22
+ homepage: https://github.com/OkiStuff/ConsoleGL
22
23
  licenses:
23
24
  - MIT
24
25
  metadata: {}
@@ -40,5 +41,5 @@ requirements: []
40
41
  rubygems_version: 3.0.3
41
42
  signing_key:
42
43
  specification_version: 4
43
- summary: Rendering Engine for Ruby in the console
44
+ summary: Rendering Engine for Ruby
44
45
  test_files: []