Parcourir la source

Fix documentation. Make SystemListener.rescale a default method

Riccardo Balbo il y a 3 ans
Parent
commit
b6833644c2

+ 0 - 3
jme3-core/src/main/java/com/jme3/app/LegacyApplication.java

@@ -579,9 +579,6 @@ public class LegacyApplication implements Application, SystemListener {
     }
 
 
-    /**
-     * Internal use only.
-     */
     @Override
     public void rescale(float x, float y){
         if (renderManager != null) {

+ 2 - 2
jme3-core/src/main/java/com/jme3/post/SceneProcessor.java

@@ -66,8 +66,8 @@ public interface SceneProcessor {
      * Called when the scale of the viewport has been changed.
      *
      * @param vp the affected ViewPort
-     * @param x the new scale (in pixels)
-     * @param y the new scale (in pixels)
+     * @param x the new horizontal scale 
+     * @param y the new vertical scale 
      */
     public default void rescale(ViewPort vp, float x, float y){
 

+ 7 - 0
jme3-core/src/main/java/com/jme3/renderer/RenderManager.java

@@ -385,6 +385,13 @@ public class RenderManager {
         }
     }
 
+    /**
+     * Internal use only.
+     * Updates the scale of all on-screen ViewPorts
+     *
+     * @param w the new horizontal scale
+     * @param h the new vertical scale
+     */
     public void notifyRescale(float x, float y) {
         for (ViewPort vp : preViewPorts) {
             notifyRescale(vp, x, y);

+ 2 - 4
jme3-core/src/main/java/com/jme3/system/AppSettings.java

@@ -767,10 +767,8 @@ public final class AppSettings extends HashMap<String, Object> {
     /**
      * Set the size of the window
      * 
-     * @param width
-     *            The width
-     * @param height
-     *            The height (Default: 640x480)
+     * @param width The width in pixels (default = resolution width)
+     * @param height The height in pixels (default = resolution height)
      */
     public void setWindowSize(int width, int height) {
         putInteger("WindowWidth", width);

+ 5 - 3
jme3-core/src/main/java/com/jme3/system/SystemListener.java

@@ -53,10 +53,12 @@ public interface SystemListener {
 
     /**
      * Called to notify the application that the scale has changed.
-     * @param x the new scale of the display (in pixels, &ge;0)
-     * @param y the new scale of the display (in pixels, &ge;0)
+     * @param x the new horizontal scale of the display 
+     * @param y the new vertical scale of the display
      */
-    public void rescale(float x, float y);
+    public default void rescale(float x, float y){
+
+    }
 
 
     /**