Class: Viewport::WithToneAndColors::Color
Instance Attribute Summary
#alpha, #blue, #green, #red
Instance Method Summary
collapse
#inspect, new, #to_s
Constructor Details
#initialize(viewport, r, g, b, a) ⇒ Color
Returns a new instance of Color.
173
174
175
176
177
|
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/00002 Viewport.rb', line 173
def initialize(viewport, r, g, b, a)
@viewport = viewport
super(r, g, b, a)
update_viewport
end
|
Instance Method Details
#alpha=(v)
202
203
204
205
206
207
|
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/00002 Viewport.rb', line 202
def alpha=(v)
return if v == alpha
super
update_viewport
end
|
#blue=(v)
195
196
197
198
199
200
|
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/00002 Viewport.rb', line 195
def blue=(v)
return if v == blue
super
update_viewport
end
|
#green=(v)
188
189
190
191
192
193
|
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/00002 Viewport.rb', line 188
def green=(v)
return if v == green
super
update_viewport
end
|
#set(*args)
179
180
181
182
183
184
185
186
|
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/00002 Viewport.rb', line 179
def set(*args)
r = red
g = green
b = blue
a = alpha
super
update_viewport if r != red || g != green || b != blue || a != alpha
end
|