DEADSOFTWARE

Rename ButtonDrawer -> ButtonRenderer
authorfred-boy <fredboy@protonmail.com>
Sun, 29 Sep 2019 12:09:31 +0000 (19:09 +0700)
committerfred-boy <fredboy@protonmail.com>
Sun, 29 Sep 2019 12:09:31 +0000 (19:09 +0700)
fix #7

core/src/ru/deadsoftware/cavedroid/menu/objects/Button.java
core/src/ru/deadsoftware/cavedroid/menu/objects/ButtonRenderer.java [moved from core/src/ru/deadsoftware/cavedroid/menu/objects/ButtonDrawer.java with 70% similarity]
core/src/ru/deadsoftware/cavedroid/menu/submenus/Menu.java
core/src/ru/deadsoftware/cavedroid/menu/submenus/MenuMain.java
core/src/ru/deadsoftware/cavedroid/menu/submenus/MenuNewGame.java

index 88dc5b3030747caf2c399514b27a4132921e39e9..fa24eb7370797d757512691b5e2902fabd03d20d 100644 (file)
@@ -63,7 +63,7 @@ public class Button {
         this.type = type;
     }
 
-    public void draw(ButtonDrawer drawer) {
+    public void draw(ButtonRenderer drawer) {
         drawer.draw(this);
     }
 
similarity index 70%
rename from core/src/ru/deadsoftware/cavedroid/menu/objects/ButtonDrawer.java
rename to core/src/ru/deadsoftware/cavedroid/menu/objects/ButtonRenderer.java
index 070f973be1be837794d6e28262199e26a1e18ab7..6a429f248b5b02809e975b1fed4b49c7af89438c 100644 (file)
@@ -1,6 +1,6 @@
 package ru.deadsoftware.cavedroid.menu.objects;
 
-public interface ButtonDrawer {
+public interface ButtonRenderer {
 
     void draw(Button button);
 
index 21bf02b083050bb90be78135fb078a0fc1aadcb3..17367d8f98884ecf513f3a182f6adcd668d5af7a 100644 (file)
@@ -9,7 +9,7 @@ import com.badlogic.gdx.utils.JsonValue;
 import ru.deadsoftware.cavedroid.CaveGame;
 import ru.deadsoftware.cavedroid.GameScreen;
 import ru.deadsoftware.cavedroid.menu.objects.Button;
-import ru.deadsoftware.cavedroid.menu.objects.ButtonDrawer;
+import ru.deadsoftware.cavedroid.menu.objects.ButtonRenderer;
 import ru.deadsoftware.cavedroid.menu.objects.ButtonEventListener;
 import ru.deadsoftware.cavedroid.misc.Assets;
 
@@ -17,7 +17,7 @@ import java.util.HashMap;
 
 public abstract class Menu {
 
-    private ButtonDrawer buttonDrawer;
+    private ButtonRenderer buttonRenderer;
 
     private float width;
     private float height;
@@ -30,12 +30,12 @@ public abstract class Menu {
     /**
      * @param width  Viewport width
      * @param height Viewport height
-     * @param buttonDrawer {@link ButtonDrawer} that will draw the buttons of this menu
+     * @param buttonRenderer {@link ButtonRenderer} that will draw the buttons of this menu
      */
-    Menu(float width, float height, ButtonDrawer buttonDrawer) {
+    Menu(float width, float height, ButtonRenderer buttonRenderer) {
         this.width = width;
         this.height = height;
-        this.buttonDrawer = buttonDrawer;
+        this.buttonRenderer = buttonRenderer;
         initButtons();
     }
 
@@ -96,7 +96,7 @@ public abstract class Menu {
                     button.setType(1);
                 }
             }
-            button.draw(buttonDrawer);
+            button.draw(buttonRenderer);
         }
     }
 
index 84b73ccd76805c7184989db4b106bf12bf6cd5db..5abb5f17ecce6ba0f1de7b48c3d780462d979466 100644 (file)
@@ -3,15 +3,15 @@ package ru.deadsoftware.cavedroid.menu.submenus;
 import com.badlogic.gdx.Gdx;
 import ru.deadsoftware.cavedroid.game.GameSaver;
 import ru.deadsoftware.cavedroid.menu.objects.Button;
-import ru.deadsoftware.cavedroid.menu.objects.ButtonDrawer;
+import ru.deadsoftware.cavedroid.menu.objects.ButtonRenderer;
 import ru.deadsoftware.cavedroid.menu.objects.ButtonEventListener;
 
 import java.util.HashMap;
 
 public class MenuMain extends Menu {
 
-    public MenuMain(float width, float height, ButtonDrawer buttonDrawer) {
-        super(width, height, buttonDrawer);
+    public MenuMain(float width, float height, ButtonRenderer buttonRenderer) {
+        super(width, height, buttonRenderer);
     }
 
     @Override
index e4b719ac23291f8c3a6a39ec56c8ff7bc9e63e7b..8fc025c2cafe7b630939eb5997d0043883e31f89 100644 (file)
@@ -1,15 +1,15 @@
 package ru.deadsoftware.cavedroid.menu.submenus;
 
 import com.badlogic.gdx.Gdx;
-import ru.deadsoftware.cavedroid.menu.objects.ButtonDrawer;
+import ru.deadsoftware.cavedroid.menu.objects.ButtonRenderer;
 import ru.deadsoftware.cavedroid.menu.objects.ButtonEventListener;
 
 import java.util.HashMap;
 
 public class MenuNewGame extends Menu {
 
-    public MenuNewGame(float width, float height, ButtonDrawer buttonDrawer) {
-        super(width, height, buttonDrawer);
+    public MenuNewGame(float width, float height, ButtonRenderer buttonRenderer) {
+        super(width, height, buttonRenderer);
     }
 
     @Override