Class: Viewport::WithToneAndColors::Tone
Instance Attribute Summary
#blue, #gray, #green, #red
Instance Method Summary
collapse
#inspect, new, #to_s
Constructor Details
#initialize(viewport, r, g, b, g2) ⇒ Tone
Returns a new instance of Tone.
129
130
131
132
133
|
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/00002 Viewport.rb', line 129
def initialize(viewport, r, g, b, g2)
@viewport = viewport
super(r, g, b, g2)
update_viewport
end
|
Instance Method Details
#blue=(v)
151
152
153
154
155
156
|
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/00002 Viewport.rb', line 151
def blue=(v)
return if v == blue
super
update_viewport
end
|
#gray=(v)
158
159
160
161
162
163
|
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/00002 Viewport.rb', line 158
def gray=(v)
return if v == gray
super
update_viewport
end
|
#green=(v)
144
145
146
147
148
149
|
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/00002 Viewport.rb', line 144
def green=(v)
return if v == green
super
update_viewport
end
|
#set(*args)
135
136
137
138
139
140
141
142
|
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/00002 Viewport.rb', line 135
def set(*args)
r = red
g = green
b = blue
g2 = gray
super
update_viewport if r != red || g != green || b != blue || g2 != gray
end
|