summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 32861e6)
raw | patch | inline | side by side (parent: 32861e6)
author | fred-boy <fredboy@protonmail.com> | |
Sun, 29 Sep 2019 12:09:31 +0000 (19:09 +0700) | ||
committer | fred-boy <fredboy@protonmail.com> | |
Sun, 29 Sep 2019 12:09:31 +0000 (19:09 +0700) |
fix #7
diff --git a/core/src/ru/deadsoftware/cavedroid/menu/objects/Button.java b/core/src/ru/deadsoftware/cavedroid/menu/objects/Button.java
index 88dc5b3030747caf2c399514b27a4132921e39e9..fa24eb7370797d757512691b5e2902fabd03d20d 100644 (file)
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 070f973be1be837794d6e28262199e26a1e18ab7..6a429f248b5b02809e975b1fed4b49c7af89438c 100644 (file)
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)
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 21bf02b083050bb90be78135fb078a0fc1aadcb3..17367d8f98884ecf513f3a182f6adcd668d5af7a 100644 (file)
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;
public abstract class Menu {
- private ButtonDrawer buttonDrawer;
+ private ButtonRenderer buttonRenderer;
private float width;
private float height;
/**
* @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();
}
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 84b73ccd76805c7184989db4b106bf12bf6cd5db..5abb5f17ecce6ba0f1de7b48c3d780462d979466 100644 (file)
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 e4b719ac23291f8c3a6a39ec56c8ff7bc9e63e7b..8fc025c2cafe7b630939eb5997d0043883e31f89 100644 (file)
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