From 946677fd540757ff72145c4b93666dc9787bfb38 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Mon, 10 Apr 2017 10:55:58 -0400 Subject: [PATCH] gamnit: fix `UICamera::height` doc and double assignation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- lib/gamnit/cameras.nit | 8 ++++---- lib/gamnit/flat.nit | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/gamnit/cameras.nit b/lib/gamnit/cameras.nit index c9754f7..042896a 100644 --- a/lib/gamnit/cameras.nit +++ b/lib/gamnit/cameras.nit @@ -210,13 +210,13 @@ class UICamera # Width in world units, defaults to the width in pixels of the screen var width: Float = display.width.to_f is lazy - # Height in world units, defaults to the height in pixels of the screen - var height: Float = display.height.to_f is lazy + # Height in world units, defaults to 1080.0 + # + # Set this value using `reset_height`. + var height = 1080.0 # Reset the camera position so that `height` world units are visible on the Y axis # - # By default, `height` is set to `display.height`. - # # This can be used to set standardized UI units independently from the screen resolution. fun reset_height(height: nullable Float) do diff --git a/lib/gamnit/flat.nit b/lib/gamnit/flat.nit index cbcc2e7..6a52dc4 100644 --- a/lib/gamnit/flat.nit +++ b/lib/gamnit/flat.nit @@ -293,8 +293,6 @@ redef class App do texture.load - ui_camera.reset_height 1080.0 - var splash = new Sprite(texture, ui_camera.center) ui_sprites.add splash -- 1.7.9.5