Index: gacivs-frontend/trunk/gacivs-frontend/gacivs-static-war/src/main/webapp/i18n/i18n_hu.properties =================================================================== diff -u -N -r3955 -r3956 --- gacivs-frontend/trunk/gacivs-frontend/gacivs-static-war/src/main/webapp/i18n/i18n_hu.properties (.../i18n_hu.properties) (revision 3955) +++ gacivs-frontend/trunk/gacivs-frontend/gacivs-static-war/src/main/webapp/i18n/i18n_hu.properties (.../i18n_hu.properties) (revision 3956) @@ -223,6 +223,8 @@ utils.CommonUtils_h=ó utils.CommonUtils_m=p utils.CommonUtils_s=mp +view.topbar.SpaceShipBar_titleLabel=Űrhajó +view.topbar.SpaceShipBar_listByPlayerMessage=Letöltjük {0} űrhajóját view.topbar.cityoverview.WorkQueueItemHalfBuyBar_titleLabel=Megveszed a maradék felét? view.topbar.cityoverview.WorkQueueItemHalfBuyBar_buyButton=Megveszem view.topbar.cityoverview.WorkQueueItemHalfBuyBar_refreshMessage=A kincstár tartalmának frissítése Index: gacivs-frontend/trunk/gacivs-frontend/gacivs-gdx-core/src/main/java/info/gacivs/gdx/core/view/topbar/SpaceShipBar.java =================================================================== diff -u -N -r3818 -r3956 --- gacivs-frontend/trunk/gacivs-frontend/gacivs-gdx-core/src/main/java/info/gacivs/gdx/core/view/topbar/SpaceShipBar.java (.../SpaceShipBar.java) (revision 3818) +++ gacivs-frontend/trunk/gacivs-frontend/gacivs-gdx-core/src/main/java/info/gacivs/gdx/core/view/topbar/SpaceShipBar.java (.../SpaceShipBar.java) (revision 3956) @@ -7,17 +7,17 @@ import com.badlogic.gdx.scenes.scene2d.InputEvent; import com.badlogic.gdx.scenes.scene2d.ui.ImageButton; import com.badlogic.gdx.scenes.scene2d.ui.Label; -import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; import com.badlogic.gdx.scenes.scene2d.ui.Table; +import com.badlogic.gdx.utils.Align; import info.gacivs.common.entities.Account; import info.gacivs.common.entities.SpaceShipPart; import info.gacivs.gdx.core.control.SpaceShipBackendCall; -import info.gacivs.gdx.core.model.Screen; -import info.gacivs.gdx.core.model.Sidebars; +import info.gacivs.gdx.core.model.Bundle; import info.gacivs.gdx.core.model.Textures; import info.gacivs.gdx.core.model.World; import info.gacivs.gdx.core.utils.ClickListener; import info.gacivs.gdx.core.utils.DrawUtils; +import info.gacivs.gdx.core.utils.LayoutUtils; import info.gacivs.gdx.core.utils.ResponseRunner; import info.gacivs.gdx.core.view.sidebar.AbstractBar; import info.gacivs.gdx.core.view.widget.SpaceShipWidget; @@ -26,6 +26,8 @@ /** * Dialog of the space ship. * + * Language: OK. + * * @author Gábor AUTH */ public class SpaceShipBar extends AbstractBar { @@ -40,45 +42,30 @@ */ public SpaceShipBar() { super(); + setPosition(getClosedPosition()); - final Float width = 330.0f; - final Float height = getSize() - 10.0f; + final LayoutUtils lu = new LayoutUtils(336, 446); + lu.add(DrawUtils.get(Textures.getUI(), "bronze", "dialog-256").ninePatchDrawable(), 0, 0, 336, 446); - final Label titleLabel = new Label("Space ship", Textures.getSkin(), "default-font-32", Color.YELLOW); - final ImageButton reloadBtn = DrawUtils.get(Textures.getTiles(), "commands", "patrol").imageButton(); - final ImageButton cancelBtn = DrawUtils.get(Textures.getTiles(), "commands", "no_orders").imageButton(); - - reloadBtn.addListener(new ClickListener(this, "reload") { - + final ImageButton cancelButton = DrawUtils.get(Textures.getUI(), "bronze", "button-close").imageButton(); + lu.add(cancelButton, 312, 5, 16, 16); + cancelButton.addListener(new ClickListener(this, "close") { @Override - public final void clicked(final InputEvent event) { - reload(World.getAccount()); + public void clicked(final InputEvent event) { + SpaceShipBar.this.close(); } }); - cancelBtn.addListener(new ClickListener(this, "close") { - @Override - public final void clicked(final InputEvent event) { - close(); - } - }); + final Label titleLabel = new Label(Bundle.get("view.topbar.SpaceShipBar", "titleLabel"), Textures.getSkin(), "default-font-16", Color.WHITE); + titleLabel.setAlignment(Align.left); + titleLabel.setEllipsis(true); + lu.add(titleLabel, 10, 4, 302, 16); - final Table titleTable = new Table(); - titleTable.add(titleLabel).left().top().width(width - 75.0f).height(48.0f); - titleTable.add(reloadBtn).left().top().width(30.0f).height(30.0f).padTop(9.0f).padBottom(9.0f).padRight(5.0f); - titleTable.add(cancelBtn).left().top().width(30.0f).height(30.0f).padTop(9.0f).padBottom(9.0f).row(); - - final Table barContent = new Table().pad(5.0f); - final ScrollPane scrollPane = new ScrollPane(barContent, Textures.getSkin()); - scrollPane.setScrollingDisabled(true, false); - this.add(scrollPane).left().top().width(width).height(height).row(); - this.spaceShipTable = new Table(); + lu.add(DrawUtils.get(Textures.getUI(), "bronze", "black_shadow").ninePatchDrawable(), 5, 25, 330, 420); + lu.add(this.spaceShipTable, 3, 23, 330, 420); - barContent.add(titleTable).left().top().width(width - 10.0f).height(48.0f).row(); - barContent.add(spaceShipTable).left().top().width(330.0f).height(420.0f).row(); - - setPosition(getClosedPosition()); + super.add(lu.build()); } /** @@ -95,8 +82,7 @@ * Reload the skill values. */ private synchronized void reload(final Account player) { - if (World.getAccount() == null) { - Sidebars.get(FailureBar.class).open("Cannot load your account! Sorry... :("); + if (player == null) { return; } @@ -108,7 +94,7 @@ spaceShipTable.clearChildren(); spaceShipTable.add(new SpaceShipWidget(parts)); } - }, "Loading the space ship of " + player.getName(), player.getId()); + }, Bundle.format("view.topbar.SpaceShipBar", "listByPlayerMessage", player.getName()), player.getId()); } /** @@ -150,6 +136,6 @@ */ @Override protected Float getSize(final Type type) { - return Screen.h - 96.0f; + return 446.0f; } } Index: gacivs-frontend/trunk/gacivs-frontend/gacivs-gdx-core/src/main/java/info/gacivs/gdx/core/view/widget/SpaceShipWidget.java =================================================================== diff -u -N -r3953 -r3956 --- gacivs-frontend/trunk/gacivs-frontend/gacivs-gdx-core/src/main/java/info/gacivs/gdx/core/view/widget/SpaceShipWidget.java (.../SpaceShipWidget.java) (revision 3953) +++ gacivs-frontend/trunk/gacivs-frontend/gacivs-gdx-core/src/main/java/info/gacivs/gdx/core/view/widget/SpaceShipWidget.java (.../SpaceShipWidget.java) (revision 3956) @@ -103,7 +103,7 @@ STRUCTURES.add(new Part("structural", 30, 30, 4 * 30, 3 * 30)); STRUCTURES.add(new Part("structural", 30, 30, 5 * 30, 3 * 30)); - final LayoutUtils lu = new LayoutUtils(300, 420); + final LayoutUtils lu = new LayoutUtils(330, 420); final ImageButton backgroundImg = DrawUtils.get(Textures.getTiles(), "spaceship", "background").imageButton(); lu.add(backgroundImg, 0, 0, 330, 420); Index: gacivs-frontend/trunk/gacivs-frontend/gacivs-static-war/src/main/webapp/i18n/i18n.properties =================================================================== diff -u -N -r3955 -r3956 --- gacivs-frontend/trunk/gacivs-frontend/gacivs-static-war/src/main/webapp/i18n/i18n.properties (.../i18n.properties) (revision 3955) +++ gacivs-frontend/trunk/gacivs-frontend/gacivs-static-war/src/main/webapp/i18n/i18n.properties (.../i18n.properties) (revision 3956) @@ -219,10 +219,17 @@ tutorial.TutorialSequence_CHAT_message=You can chat with other players\! Locate the icon and open the chat and say hello to other players\! You can ask for help us anytime\! \:) tutorial.TutorialSequence_FACEBOOK_GROUP_message=You can join our Facebook group and discuss different ideas about the game, locate the Facebook icon and open it\! \:) tutorial.TutorialSequence_playerTutorialStepMessage=Updating tutorial step +# Day abbreviation utils.CommonUtils_d=d +# Hour abbreviation utils.CommonUtils_h=h +# Minute abbreviation utils.CommonUtils_m=m +# Second abbreviation utils.CommonUtils_s=s +view.topbar.SpaceShipBar_titleLabel=Space ship +# Loading space ship of {player name} +view.topbar.SpaceShipBar_listByPlayerMessage=Loading the space ship of {0} view.topbar.cityoverview.WorkQueueItemHalfBuyBar_titleLabel=Buy half of remaining? view.topbar.cityoverview.WorkQueueItemHalfBuyBar_buyButton=Buy view.topbar.cityoverview.WorkQueueItemHalfBuyBar_refreshMessage=Refresh the value of the treasury