Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/alketii/minilens
Browse files Browse the repository at this point in the history
  • Loading branch information
alketii committed Apr 17, 2015
2 parents b2b37b6 + 4490b54 commit 8d2d9ed
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/global.gd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ func _ready():

func window_resize():
var window_size = OS.get_window_size()
var changed = false
if(window_size.x < 300):
window_size.x = 300
changed = true
if(window_size.y < 250):
window_size.y = 250
changed = true
if(changed):
OS.set_window_size(window_size)
var scale_factor = orig_size.y/window_size.y
var new_size = Vector2(window_size.x*scale_factor, orig_size.y)
viewport.set_size_override(true, new_size)
Expand Down

0 comments on commit 8d2d9ed

Please sign in to comment.