ConsoleGL 1.0.6 → 1.1.0
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 +4 -4
- data/lib/consolegl.rb +48 -9
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e21346a99d89d4bec6eaa92b63cc8d39f33574a811779d328ab82c90ebc2ace
|
4
|
+
data.tar.gz: 0b067b96c6da60aef36684a6a23e6031ae8204bd4b841c28be8bbee5c60c3dda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 817a0db2a0bde2b144da91314d2aaaac3e1dd4369e81df31886c427ada5465a887e28a8bb92059ee0094742fa199fa185abf9b96765bd5843fcd901433c2afb7
|
7
|
+
data.tar.gz: abcea8d1fd5d18b41f2599a629bcefcdd21c6cf54bdc474fd5b8f4bef0ffcf309b58dee1345db030e40001708d824d4c4dfb220857043630255a8db7af22f9f4
|
data/lib/consolegl.rb
CHANGED
@@ -23,17 +23,54 @@
|
|
23
23
|
#Color = COLOR ID
|
24
24
|
#Usage:
|
25
25
|
#LineVertical(Color.BLUE)
|
26
|
+
require 'io/console'
|
27
|
+
|
28
|
+
class Input
|
29
|
+
def 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
|
+
|
39
|
+
|
40
|
+
|
41
|
+
class Color
|
42
|
+
|
43
|
+
## COLOR VALUE ##
|
44
|
+
|
45
|
+
def self.RED
|
46
|
+
return 31
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.GREEN
|
50
|
+
return 32
|
51
|
+
end
|
52
|
+
|
53
|
+
def self.YELLOW
|
54
|
+
return 33
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.BLUE
|
58
|
+
return 34
|
59
|
+
end
|
60
|
+
|
61
|
+
def self.LIGHT_BLUE
|
62
|
+
return 36
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.WHITE
|
66
|
+
return 0
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
26
70
|
|
27
71
|
class Console
|
28
72
|
## COLOR ##
|
29
73
|
|
30
|
-
RED = 31
|
31
|
-
GREEN = 32
|
32
|
-
YELLOW = 33
|
33
|
-
BLUE = 34
|
34
|
-
LIGHT_BLUE = 36
|
35
|
-
WHITE = false
|
36
|
-
|
37
74
|
def self.addColor(x,s)
|
38
75
|
|
39
76
|
if x != false
|
@@ -122,11 +159,13 @@ class Console
|
|
122
159
|
|
123
160
|
|
124
161
|
|
125
|
-
def SetConsoleColor(value)
|
162
|
+
def self.SetConsoleColor(value)
|
126
163
|
system "COLOR " + value.to_s
|
127
164
|
end
|
128
165
|
|
129
|
-
def ResetConsoleColor()
|
166
|
+
def self.ResetConsoleColor()
|
130
167
|
system "COLOR 07"
|
131
168
|
end
|
169
|
+
|
170
|
+
|
132
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
|
4
|
+
version: 1.1.0
|
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-
|
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
|
14
|
+
console: 1.1.0 Updates: Added 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://
|
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
|
44
|
+
summary: Rendering Engine for Ruby
|
44
45
|
test_files: []
|