gamnit: fix `UICamera::height` doc and double assignation
[nit.git] / lib / gamnit / cameras.nit
index 401e1ce..042896a 100644 (file)
@@ -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
@@ -264,7 +264,7 @@ class UICamera
        # Bottom right corner of the screen, at z = 0
        fun bottom_right: Point3d[Float] do return new Point3d[Float](position.x + width, position.y - height, 0.0)
 
-       # TODO cache the anchors and the matrix
+       # TODO cache the anchors
 
        redef fun mvp_matrix
        do