From f894e0e20eb63a2b489ccfa2f5e64b98bf0c9a34 Mon Sep 17 00:00:00 2001 From: fred-boy Date: Sun, 29 Sep 2019 19:09:31 +0700 Subject: [PATCH] Rename ButtonDrawer -> ButtonRenderer fix #7 --- .../deadsoftware/cavedroid/menu/objects/Button.java | 2 +- .../{ButtonDrawer.java => ButtonRenderer.java} | 2 +- .../deadsoftware/cavedroid/menu/submenus/Menu.java | 12 ++++++------ .../cavedroid/menu/submenus/MenuMain.java | 6 +++--- .../cavedroid/menu/submenus/MenuNewGame.java | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) rename core/src/ru/deadsoftware/cavedroid/menu/objects/{ButtonDrawer.java => ButtonRenderer.java} (70%) diff --git a/core/src/ru/deadsoftware/cavedroid/menu/objects/Button.java b/core/src/ru/deadsoftware/cavedroid/menu/objects/Button.java index 88dc5b3..fa24eb7 100644 --- a/core/src/ru/deadsoftware/cavedroid/menu/objects/Button.java +++ b/core/src/ru/deadsoftware/cavedroid/menu/objects/Button.java @@ -63,7 +63,7 @@ public class Button { this.type = type; } - public void draw(ButtonDrawer drawer) { + public void draw(ButtonRenderer drawer) { drawer.draw(this); } diff --git a/core/src/ru/deadsoftware/cavedroid/menu/objects/ButtonDrawer.java b/core/src/ru/deadsoftware/cavedroid/menu/objects/ButtonRenderer.java 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 070f973..6a429f2 100644 --- a/core/src/ru/deadsoftware/cavedroid/menu/objects/ButtonDrawer.java +++ b/core/src/ru/deadsoftware/cavedroid/menu/objects/ButtonRenderer.java @@ -1,6 +1,6 @@ package ru.deadsoftware.cavedroid.menu.objects; -public interface ButtonDrawer { +public interface ButtonRenderer { void draw(Button button); diff --git a/core/src/ru/deadsoftware/cavedroid/menu/submenus/Menu.java b/core/src/ru/deadsoftware/cavedroid/menu/submenus/Menu.java index 21bf02b..17367d8 100644 --- a/core/src/ru/deadsoftware/cavedroid/menu/submenus/Menu.java +++ b/core/src/ru/deadsoftware/cavedroid/menu/submenus/Menu.java @@ -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); } } diff --git a/core/src/ru/deadsoftware/cavedroid/menu/submenus/MenuMain.java b/core/src/ru/deadsoftware/cavedroid/menu/submenus/MenuMain.java index 84b73cc..5abb5f1 100644 --- a/core/src/ru/deadsoftware/cavedroid/menu/submenus/MenuMain.java +++ b/core/src/ru/deadsoftware/cavedroid/menu/submenus/MenuMain.java @@ -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 diff --git a/core/src/ru/deadsoftware/cavedroid/menu/submenus/MenuNewGame.java b/core/src/ru/deadsoftware/cavedroid/menu/submenus/MenuNewGame.java index e4b719a..8fc025c 100644 --- a/core/src/ru/deadsoftware/cavedroid/menu/submenus/MenuNewGame.java +++ b/core/src/ru/deadsoftware/cavedroid/menu/submenus/MenuNewGame.java @@ -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 -- 2.29.2