added most gui elements to localization

This commit is contained in:
MachineMuse 2015-08-29 08:24:19 -06:00
parent ef8d1d7ab8
commit c9c47b6f44
14 changed files with 217 additions and 29 deletions

View file

@ -118,3 +118,26 @@ module.coolingSystem.desc=Cools down heat-producing modules quicker.
module.tint.desc=Give your armor some coloured tinting to customize your armor's appearance.
module.transparentArmor.desc=Make the item transparent, so you can show off your skin without losing armor.
module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor.
gui.noModulesFound.line1=No modular powersuit items
gui.noModulesFound.line2=found in inventory. Make some!
gui.red=Red
gui.green=Green
gui.blue=Blue
gui.install=Install
gui.salvage=Salvage
gui.newKeybind=New
gui.trashKeybind=Trash
gui.pressKey=Press Key
gui.keybindInstructions1=Use 'new' to bind new keys.
gui.keybindInstructions2=Drag and drop modules to bind them to keys.
gui.keybindInstructions3=Drop keys on 'trash' to unbind them.
gui.keybindTaken=Taken!
gui.tab.tinker=Tinker
gui.tab.keybinds=Keybinds
gui.tab.visual=Visual

View file

@ -120,3 +120,25 @@ module.coolingSystem.desc=Cools down heat-producing modules quicker.
module.tint.desc=Give your armor some coloured tinting to customize your armor's appearance.
module.transparentArmor.desc=Make the item transparent, so you can show off your skin without losing armor.
module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor.
gui.noModulesFound.line1=No modular powersuit items
gui.noModulesFound.line2=found in inventory. Make some!
gui.red=Red
gui.green=Green
gui.blue=Blue
gui.install=Install
gui.salvage=Salvage
gui.newKeybind=New
gui.trashKeybind=Trash
gui.pressKey=Press Key
gui.keybindInstructions1=Use 'new' to bind new keys.
gui.keybindInstructions2=Drag and drop modules to bind them to keys.
gui.keybindInstructions3=Drop keys on 'trash' to unbind them.
gui.keybindTaken=Taken!
gui.tab.tinker=Tinker
gui.tab.keybinds=Keybinds
gui.tab.visual=Visual

View file

@ -120,3 +120,26 @@ module.coolingSystem.desc=Cools down heat-producing modules quicker.
module.tint.desc=Give your armor some coloured tinting to customize your armor's appearance.
module.transparentArmor.desc=Make the item transparent, so you can show off your skin without losing armor.
module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor.
gui.noModulesFound.line1=No modular powersuit items
gui.noModulesFound.line2=found in inventory. Make some!
gui.red=Red
gui.green=Green
gui.blue=Blue
gui.install=Install
gui.salvage=Salvage
gui.newKeybind=New
gui.trashKeybind=Trash
gui.pressKey=Press Key
gui.keybindInstructions1=Use 'new' to bind new keys.
gui.keybindInstructions2=Drag and drop modules to bind them to keys.
gui.keybindInstructions3=Drop keys on 'trash' to unbind them.
gui.keybindTaken=Taken!
gui.tab.tinker=Tinker
gui.tab.keybinds=Keybinds
gui.tab.visual=Visual

View file

@ -117,3 +117,26 @@ module.coolingSystem.desc=Cools down heat-producing modules quicker.
module.tint.desc=Give your armor some coloured tinting to customize your armor's appearance.
module.transparentArmor.desc=Make the item transparent, so you can show off your skin without losing armor.
module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor.
gui.noModulesFound.line1=No modular powersuit items
gui.noModulesFound.line2=found in inventory. Make some!
gui.red=Red
gui.green=Green
gui.blue=Blue
gui.install=Install
gui.salvage=Salvage
gui.newKeybind=New
gui.trashKeybind=Trash
gui.pressKey=Press Key
gui.keybindInstructions1=Use 'new' to bind new keys.
gui.keybindInstructions2=Drag and drop modules to bind them to keys.
gui.keybindInstructions3=Drop keys on 'trash' to unbind them.
gui.keybindTaken=Taken!
gui.tab.tinker=Tinker
gui.tab.keybinds=Keybinds
gui.tab.visual=Visual

View file

@ -121,3 +121,26 @@ module.coolingSystem.desc=Cools down heat-producing modules quicker.
module.tint.desc=Give your armor some coloured tinting to customize your armor's appearance.
module.transparentArmor.desc=Make the item transparent, so you can show off your skin without losing armor.
module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor.
gui.noModulesFound.line1=No modular powersuit items
gui.noModulesFound.line2=found in inventory. Make some!
gui.red=Red
gui.green=Green
gui.blue=Blue
gui.install=Install
gui.salvage=Salvage
gui.newKeybind=New
gui.trashKeybind=Trash
gui.pressKey=Press Key
gui.keybindInstructions1=Use 'new' to bind new keys.
gui.keybindInstructions2=Drag and drop modules to bind them to keys.
gui.keybindInstructions3=Drop keys on 'trash' to unbind them.
gui.keybindTaken=Taken!
gui.tab.tinker=Tinker
gui.tab.keybinds=Keybinds
gui.tab.visual=Visual

View file

@ -121,3 +121,26 @@ module.coolingSystem.desc=Cools down heat-producing modules quicker.
module.tint.desc=Give your armor some coloured tinting to customize your armor's appearance.
module.transparentArmor.desc=Make the item transparent, so you can show off your skin without losing armor.
module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor.
gui.noModulesFound.line1=No modular powersuit items
gui.noModulesFound.line2=found in inventory. Make some!
gui.red=Red
gui.green=Green
gui.blue=Blue
gui.install=Install
gui.salvage=Salvage
gui.newKeybind=New
gui.trashKeybind=Trash
gui.pressKey=Press Key
gui.keybindInstructions1=Use 'new' to bind new keys.
gui.keybindInstructions2=Drag and drop modules to bind them to keys.
gui.keybindInstructions3=Drop keys on 'trash' to unbind them.
gui.keybindTaken=Taken!
gui.tab.tinker=Tinker
gui.tab.keybinds=Keybinds
gui.tab.visual=Visual

View file

@ -121,3 +121,26 @@ module.coolingSystem.desc=Cools down heat-producing modules quicker.
module.tint.desc=Give your armor some coloured tinting to customize your armor's appearance.
module.transparentArmor.desc=Make the item transparent, so you can show off your skin without losing armor.
module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor.
gui.noModulesFound.line1=No modular powersuit items
gui.noModulesFound.line2=found in inventory. Make some!
gui.red=Red
gui.green=Green
gui.blue=Blue
gui.install=Install
gui.salvage=Salvage
gui.newKeybind=New
gui.trashKeybind=Trash
gui.pressKey=Press Key
gui.keybindInstructions1=Use 'new' to bind new keys.
gui.keybindInstructions2=Drag and drop modules to bind them to keys.
gui.keybindInstructions3=Drop keys on 'trash' to unbind them.
gui.keybindTaken=Taken!
gui.tab.tinker=Tinker
gui.tab.keybinds=Keybinds
gui.tab.visual=Visual

View file

@ -120,3 +120,26 @@ module.coolingSystem.desc=Cools down heat-producing modules quicker.
module.tint.desc=Give your armor some coloured tinting to customize your armor's appearance.
module.transparentArmor.desc=Make the item transparent, so you can show off your skin without losing armor.
module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor.
gui.noModulesFound.line1=No modular powersuit items
gui.noModulesFound.line2=found in inventory. Make some!
gui.red=Red
gui.green=Green
gui.blue=Blue
gui.install=Install
gui.salvage=Salvage
gui.newKeybind=New
gui.trashKeybind=Trash
gui.pressKey=Press Key
gui.keybindInstructions1=Use 'new' to bind new keys.
gui.keybindInstructions2=Drag and drop modules to bind them to keys.
gui.keybindInstructions3=Drop keys on 'trash' to unbind them.
gui.keybindTaken=Taken!
gui.tab.tinker=Tinker
gui.tab.keybinds=Keybinds
gui.tab.visual=Visual

View file

@ -6,6 +6,7 @@ import net.machinemuse.general.gui.frame.*;
import net.machinemuse.utils.render.MuseRenderer;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.StatCollector;
/**
* The gui class for the TinkerTable block.
@ -57,8 +58,8 @@ public class GuiFieldTinker extends MuseGui {
if (itemSelectFrame.hasNoItems()) {
double centerx = absX(0);
double centery = absY(0);
MuseRenderer.drawCenteredString("No modular powersuit items", centerx, centery - 5);
MuseRenderer.drawCenteredString("found in inventory. Make some!", centerx, centery + 5);
MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.noModulesFound.line1"), centerx, centery - 5);
MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.noModulesFound.line2"), centerx, centery + 5);
}
}
}

View file

@ -1,12 +1,12 @@
package net.machinemuse.general.gui;
import net.machinemuse.general.gui.frame.*;
import net.machinemuse.numina.geometry.Colour;
import net.machinemuse.numina.geometry.MusePoint2D;
import net.machinemuse.general.gui.frame.*;
import net.machinemuse.utils.render.MuseRenderer;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.StatCollector;
/**
* The gui class for the TinkerTable block.
@ -78,8 +78,8 @@ public class GuiTinkerTable extends MuseGui {
if (itemSelectFrame.hasNoItems()) {
double centerx = absX(0);
double centery = absY(0);
MuseRenderer.drawCenteredString("No modular powersuit items", centerx, centery - 5);
MuseRenderer.drawCenteredString("found in inventory. Make some!", centerx, centery + 5);
MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.noModulesFound.line1"), centerx, centery - 5);
MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.noModulesFound.line2"), centerx, centery + 5);
}
}
}

View file

@ -13,6 +13,7 @@ import net.machinemuse.utils.render.GuiIcons
import net.machinemuse.utils.render.GuiIcons._
import net.minecraft.client.Minecraft
import net.minecraft.nbt.NBTTagIntArray
import net.minecraft.util.StatCollector
import scala.collection.mutable
@ -22,9 +23,9 @@ import scala.collection.mutable
*/
class ColourPickerFrame(val borderRef: MuseRect, val insideColour: Colour, val borderColour: Colour, val itemSelector: ItemSelectionFrame) extends IGuiFrame {
val border = new DrawableMuseRect(borderRef, insideColour, borderColour)
val rslider: ClickableSlider = new ClickableSlider(new MusePoint2D(border.centerx, border.top + 10), border.width - 10, "Red")
val gslider: ClickableSlider = new ClickableSlider(new MusePoint2D(border.centerx, border.top + 22), border.width - 10, "Green")
val bslider: ClickableSlider = new ClickableSlider(new MusePoint2D(border.centerx, border.top + 34), border.width - 10, "Blue")
val rslider: ClickableSlider = new ClickableSlider(new MusePoint2D(border.centerx, border.top + 8), border.width - 10, StatCollector.translateToLocal("gui.red"))
val gslider: ClickableSlider = new ClickableSlider(new MusePoint2D(border.centerx, border.top + 24), border.width - 10, StatCollector.translateToLocal("gui.green"))
val bslider: ClickableSlider = new ClickableSlider(new MusePoint2D(border.centerx, border.top + 40), border.width - 10, StatCollector.translateToLocal("gui.blue"))
def colours: Array[Int] = getOrCreateColourTag.map(e => e.func_150302_c /*getIntArray()*/ ).getOrElse(Array.empty)

View file

@ -19,6 +19,7 @@ import net.machinemuse.utils.MuseItemUtils;
import net.machinemuse.utils.render.MuseRenderer;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import java.util.List;
@ -41,11 +42,11 @@ public class InstallSalvageFrame extends ScrollableFrame {
double sizex = border.right() - border.left();
double sizey = border.bottom() - border.top();
this.installButton = new ClickableButton("Install", new MusePoint2D(
this.installButton = new ClickableButton(StatCollector.translateToLocal("gui.install"), new MusePoint2D(
border.right() - sizex / 2.0, border.bottom() - sizey
/ 4.0),
true);
this.salvageButton = new ClickableButton("Salvage", new MusePoint2D(
this.salvageButton = new ClickableButton(StatCollector.translateToLocal("gui.salvage"), new MusePoint2D(
border.left() + sizex / 2.0, border.top() + sizey / 4.0),
true);

View file

@ -19,6 +19,7 @@ import net.machinemuse.utils.MuseItemUtils;
import net.machinemuse.utils.render.MuseRenderer;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.StatCollector;
import org.lwjgl.input.Keyboard;
import java.util.HashSet;
@ -51,8 +52,8 @@ public class KeybindConfigFrame implements IGuiFrame {
this.br = br;
this.player = player;
MusePoint2D center = br.plus(ul).times(0.5);
newKeybindButton = new ClickableButton("New", center.plus(new MusePoint2D(0, -8)), true);
trashKeybindButton = new ClickableButton("Trash", center.plus(new MusePoint2D(0, 8)), true);
newKeybindButton = new ClickableButton(StatCollector.translateToLocal("gui.newKeybind"), center.plus(new MusePoint2D(0, -8)), true);
trashKeybindButton = new ClickableButton(StatCollector.translateToLocal("gui.trashKeybind"), center.plus(new MusePoint2D(0, 8)), true);
}
@Override
@ -216,7 +217,7 @@ public class KeybindConfigFrame implements IGuiFrame {
RenderState.blendingOn();
RenderState.on2D();
if (selecting) {
MuseRenderer.drawCenteredString("Press Key", center.x(), center.y());
MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.pressKey"), center.x(), center.y());
RenderState.off2D();
RenderState.blendingOff();
return;
@ -224,12 +225,12 @@ public class KeybindConfigFrame implements IGuiFrame {
newKeybindButton.draw();
trashKeybindButton.draw();
MuseTextureUtils.pushTexture(MuseTextureUtils.ITEM_TEXTURE_QUILT());
MuseRenderer.drawCenteredString("Use 'new' to bind new keys.", center.x(), center.y() + 40);
MuseRenderer.drawCenteredString("Drag and drop modules to bind them to keys.", center.x(), center.y() + 50);
MuseRenderer.drawCenteredString("Drop keys on 'trash' to unbind them.", center.x(), center.y() + 60);
MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.keybindInstructions1"), center.x(), center.y() + 40);
MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.keybindInstructions2"), center.x(), center.y() + 50);
MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.keybindInstructions3"), center.x(), center.y() + 60);
if (takenTime + 1000 > System.currentTimeMillis()) {
MusePoint2D pos = newKeybindButton.getPosition().plus(new MusePoint2D(0, -20));
MuseRenderer.drawCenteredString("Taken!", pos.x(), pos.y());
MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.keybindTaken"), pos.x(), pos.y());
}
for (ClickableModule module : modules) {
module.draw();

View file

@ -5,6 +5,7 @@ import java.util
import net.machinemuse.general.gui.clickable.ClickableButton
import net.minecraft.entity.player.EntityPlayer
import net.machinemuse.powersuits.common.ModularPowersuits
import net.minecraft.util.StatCollector
/**
* @author MachineMuse
@ -13,9 +14,9 @@ class TabSelectFrame(p: EntityPlayer, topleft: MusePoint2D, bottomright: MusePoi
worldx: Int, worldy: Int, worldz: Int)
extends IGuiFrame {
val buttons = Array(
(new ClickableButton("Tinker", topleft.midpoint(bottomright).minus(100, 0), worldy < 256 && worldy > 0), 0),
(new ClickableButton("Keybinds", topleft.midpoint(bottomright), true), 1),
(new ClickableButton("Visual", topleft.midpoint(bottomright).plus(100, 0), true), 3)
(new ClickableButton(StatCollector.translateToLocal("gui.tab.tinker"), topleft.midpoint(bottomright).minus(100, 0), worldy < 256 && worldy > 0), 0),
(new ClickableButton(StatCollector.translateToLocal("gui.tab.keybinds"), topleft.midpoint(bottomright), true), 1),
(new ClickableButton(StatCollector.translateToLocal("gui.tab.visual"), topleft.midpoint(bottomright).plus(100, 0), true), 3)
)
def onMouseDown(x: Double, y: Double, button: Int): Unit = {