summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorTom Black <[email protected]>2016-07-18 00:25:16 -0500
committerTom Black <[email protected]>2016-07-18 00:25:16 -0500
commitef5a0a34e448dc6096495c85bfb173a5c693d0a1 (patch)
treeac0339fceb62d5353273de07a735c23573d23023 /lib
parentf3e0c7c01809efcca866d6add31ede575add1d78 (diff)
downloadruby2d-ef5a0a34e448dc6096495c85bfb173a5c693d0a1.tar.gz
ruby2d-ef5a0a34e448dc6096495c85bfb173a5c693d0a1.zip
Set viewport size
Diffstat (limited to 'lib')
-rw-r--r--lib/ruby2d/window.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ruby2d/window.rb b/lib/ruby2d/window.rb
index 63b0d12..811b950 100644
--- a/lib/ruby2d/window.rb
+++ b/lib/ruby2d/window.rb
@@ -6,6 +6,7 @@ module Ruby2D
def initialize(width: 640, height: 480, title: "Ruby 2D", fps: 60, vsync: true)
@width, @height, @title = width, height, title
+ @viewport_width, @viewport_height = nil, nil
@background = Color.new([0.0, 0.0, 0.0, 1.0])
@resizable = false
@mouse_x = @mouse_y = 0
@@ -36,6 +37,8 @@ module Ruby2D
@title = opts[:title] || @title
@width = opts[:width] || @width
@height = opts[:height] || @height
+ @viewport_width = opts[:viewport_width] || @viewport_width
+ @viewport_height = opts[:viewport_height] || @viewport_height
@resizable = opts[:resizable] || @resizable
@borderless = opts[:borderless] || @borderless
@fullscreen = opts[:fullscreen] || @fullscreen