Add translatable text names to the texture wrap mode enum
This commit is contained in:
parent
74783afe3f
commit
6a2ebb6851
@ -714,6 +714,10 @@ AppearanceCfg.lbl.texture.center = Center:
|
||||
AppearanceCfg.lbl.texture.rotation = Rotation:
|
||||
AppearanceCfg.lbl.texture.repeat = Repeat:
|
||||
|
||||
! Texture Wrap Modes
|
||||
TextureWrap.Repeat = Repeat
|
||||
TextureWrap.Mirror = Repeat & Mirror
|
||||
TextureWrap.Clamp = Clamp Edge Pixels
|
||||
|
||||
! RocketConfig
|
||||
RocketCfg.lbl.Designname = Design name:
|
||||
|
@ -2,6 +2,7 @@ package net.sf.openrocket.appearance;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
import net.sf.openrocket.startup.Application;
|
||||
import net.sf.openrocket.util.Coordinate;
|
||||
|
||||
/**
|
||||
@ -12,7 +13,15 @@ import net.sf.openrocket.util.Coordinate;
|
||||
public class Decal {
|
||||
|
||||
public static enum EdgeMode {
|
||||
REPEAT, MIRROR, CLAMP;
|
||||
REPEAT("TextureWrap.Repeat"), MIRROR("TextureWrap.Mirror"), CLAMP("TextureWrap.Clamp");
|
||||
private final String transName;
|
||||
EdgeMode(final String name){
|
||||
this.transName = name;
|
||||
}
|
||||
@Override
|
||||
public String toString(){
|
||||
return Application.getTranslator().get(transName);
|
||||
}
|
||||
}
|
||||
|
||||
private final Coordinate offset, center, scale;
|
||||
|
@ -352,7 +352,7 @@ public class AppearancePanel extends JPanel {
|
||||
}
|
||||
|
||||
{ // Repeat
|
||||
new JLabel(trans.get("AppearanceCfg.lbl.texture.rotation"));
|
||||
add(new JLabel(trans.get("AppearanceCfg.lbl.texture.repeat")));
|
||||
EdgeMode[] list = new EdgeMode[EdgeMode.values().length + 1];
|
||||
System.arraycopy(EdgeMode.values(), 0, list, 1, EdgeMode.values().length);
|
||||
JComboBox combo = new JComboBox(new EnumModel<EdgeMode>(ab, "EdgeMode", list));
|
||||
|
Loading…
x
Reference in New Issue
Block a user