Class: UI::BlurScreenshot
- Inherits:
-
ShaderedSprite
- Object
- LiteRGSS::Disposable
- LiteRGSS::Drawable
- LiteRGSS::Sprite
- LiteRGSS::ShaderedSprite
- Sprite
- ShaderedSprite
- UI::BlurScreenshot
- Defined in:
- scripts/01450 Systems/00000 General/00100 UI Generics/02800 BlurScreenshot.rb
Overview
Class responsive of showing a blur screenshot in the current scene
Instance Attribute Summary
Attributes inherited from LiteRGSS::ShaderedSprite
Attributes inherited from LiteRGSS::Sprite
#__index__, #angle, #bitmap, #height, #mirror, #opacity, #ox, #oy, #src_rect, #viewport, #visible, #width, #x, #y, #z, #zoom, #zoom_x, #zoom_y
Instance Method Summary collapse
-
#dispose
Dispose the sprite.
-
#initialize(viewport = nil, last_scene) ⇒ BlurScreenshot
constructor
Create a new blur Screenshot.
-
#update_snapshot
Update the snapshot.
Methods inherited from Sprite
#load, #mouse_in?, #set_origin_div, #set_rect, #set_rect_div, #set_z, #simple_mouse_in?, #translate_mouse_coords, #update
Methods inherited from LiteRGSS::Sprite
new, #set_origin, #set_position
Methods inherited from LiteRGSS::Disposable
Constructor Details
#initialize(viewport = nil, last_scene) ⇒ BlurScreenshot
Create a new blur Screenshot
7 8 9 10 11 12 |
# File 'scripts/01450 Systems/00000 General/00100 UI Generics/02800 BlurScreenshot.rb', line 7 def initialize( = nil, last_scene) @last_scene = last_scene super( || ) self.shader = Shader.create(:blur) update_snapshot end |
Instance Method Details
#dispose
Dispose the sprite
15 16 17 18 |
# File 'scripts/01450 Systems/00000 General/00100 UI Generics/02800 BlurScreenshot.rb', line 15 def dispose bitmap.dispose super end |
#update_snapshot
Update the snapshot
21 22 23 24 |
# File 'scripts/01450 Systems/00000 General/00100 UI Generics/02800 BlurScreenshot.rb', line 21 def update_snapshot self.bitmap = create_snapshot shader.set_float_uniform('resolution', [width, height]) end |