📜
RGSS Reference Manual
  • RGSS Reference Manual
  • RGSS Specifications
  • Ruby Syntax
    • Syntax and Expressions
    • Variables and Constants
    • Literals
    • Operator Expressions
    • Control Structures
    • Method Calls
    • Class and Method Definitions
  • Standard Library
    • Built-in Functions
    • Built-in Variables
    • Built-in Classes
      • Object
        • Array
        • Exception
        • FalseClass
        • Hash
        • IO
          • File
        • MatchData
        • Module
          • Class
        • NilClass
        • Numeric
          • Integer
            • Bignum
            • Fixnum
          • Float
        • Range
        • Proc
        • Regexp
        • String
        • Symbol
        • Time
        • TrueClass
    • Built-in Modules
      • Comparable
      • Enumerable
      • Errno
      • FileTest
      • GC
      • Kernel
      • Marshal
      • Math
    • Built-in Exception Classes
  • Game Library
    • RGSS Built-in Functions
    • RGSS Built-in Classes
      • Bitmap
      • Color
      • Font
      • Plane
      • Rect
      • Sprite
      • Table
      • Tilemap
      • Tone
      • Viewport
      • Window
      • RGSSError
      • RPG::Sprite
      • RPG::Weather
    • RGSS Built-in Modules
      • Audio
      • Graphics
      • Input
      • RPG
      • RPG::Cache
    • RPGXP Data Structures
      • RPG::Map
      • RPG::MapInfo
      • RPG::Event
      • RPG::Event::Page
      • RPG::Event::Page::Condition
      • RPG::Event::Page::Graphic
      • RPG::EventCommand
      • RPG::MoveRoute
      • RPG::MoveCommand
      • RPG::Actor
      • RPG::Class
      • RPG::Class::Learning
      • RPG::Skill
      • RPG::Item
      • RPG::Weapon
      • RPG::Armor
      • RPG::Enemy
      • RPG::Enemy::Action
      • RPG::Troop
      • RPG::Troop::Member
      • RPG::Troop::Page
      • RPG::Troop::Page::Condition
      • RPG::State
      • RPG::Animation
      • RPG::Animation::Frame
      • RPG::Animation::Timing
      • RPG::Tileset
      • RPG::CommonEvent
      • RPG::System
      • RPG::System::Words
      • RPG::System::TestBattler
      • RPG::AudioFile
  • Appendix
    • Regular Expression
    • sprintf Format
Powered by GitBook
On this page
  • Superclass
  • Class Methods
  • Viewport.new(x, y, width, height)
  • Viewport.new(rect)
  • Methods
  • dispose
  • disposed?
  • flash(color, duration)
  • update
  • Properties
  • rect
  • visible
  • z
  • ox
  • oy
  • color
  • tone
  1. Game Library
  2. RGSS Built-in Classes

Viewport

The viewport class. Used when displaying sprites in one portion of the screen, with no overflow into other regions.

PreviousToneNextWindow

Last updated 1 year ago

Superclass

Class Methods

Viewport.new(x, y, width, height)

Viewport.new(rect)

Creates a viewport object.

Methods

dispose

Frees the viewport. If the viewport has already been freed, does nothing.

disposed?

Returns TRUE if the viewport has been freed.

flash(color, duration)

Begins flashing the viewport. duration specifies the number of frames the flash will last.

If color is set to nil, the viewport will disappear while flashing.

update

Refreshes the viewport flash. As a rule, this method is called once per frame.

It is not necessary to call this method if no flash effect is needed.

Properties

rect

visible

The viewport's visibility. If TRUE, the viewport is visible.

z

The viewport's Z-coordinate. The larger this value, the closer to the player the viewport will be displayed. If multiple objects share the same Z-coordinate, the more recently created object will be displayed closest to the player.

ox

The X-coordinate of the viewport's starting point. Change this value to shake the screen, etc.

oy

The Y-coordinate of the viewport's starting point. Change this value to shake the screen, etc.

color

tone

The box () defining the viewport.

The color () to be blended with the viewport. Alpha values are used in the blending ratio.

Handled separately from the color blended into a effect.

The viewport's color tone ().

Object
Rect
Color
flash
Tone