diff --git a/assets/languages/en/Editors.xml b/assets/languages/en/Editors.xml
index 0ff90c6f..80a6afbb 100644
--- a/assets/languages/en/Editors.xml
+++ b/assets/languages/en/Editors.xml
@@ -12,8 +12,8 @@
Select a song to modify the charts from."
- Press ACCEPT to choose a difficulty to edit.
- Press ACCEPT to edit the chart for the selected difficulty.
+ Press ACCEPT to choose a difficulty to edit.
+ Press ACCEPT to edit the chart for the selected difficulty.
Select a difficulty to continue.
New Difficulty
New Song
@@ -246,13 +246,141 @@
-
- Character Editor
+
+
+
+ Press ACCEPT to edit this character.
+ New Character
+ Select a character to edit
+
+
+ New Character: Feature Not Implemented!
+ This feature isn't implemented yet. Please wait for more cne updates to have this functional.\n\n\n- Codename Devs
+
+
+
+
+ Creating Animation
+ Animation {0} properties
+
+ Create New Animation
+ Edit Animation Properties
+
+ Name
+ Animation
+ FPS
+ Looped
+ Looping
+ Indices
+ Offset (X,Y)
+
+
+
+ Editing Character
+
+ Sprite Data
+
+ Sprite
+ Icon
+ Game Over Character
+ Antialiasing
+ Antialiased
+ Flip X
+ Flipped
+ Icon Color
+
+ Character Data
+
+ Position (X,Y)
+ Camera Position (X,Y)
+ Scale
+ Sing Duration (Steps)
+ Custom Values (Advanced)
+ Is Player
+ Is GF
+
+
+
+ Character Editor
+
+
+ File
+
+ New
+ Save
+ Save As...
+ Exit
+
+
+ Edit
+
+ Undo
+ Redo
+
+
+ Character
+
+ New Animation
+ Edit Animation
+ Delete Animation
+ Edit Info
+
+
+ Playback
+
+ Play Animation
+ Stop Animation
+
+
+ Offsets
+
+ Move Left
+ Move Up
+ Move Down
+ Move Right
+
+
+
+
+ Clear Offsets
+
+
+ View
+
+ Zoom in
+ Zoom out
+ Reset Zoom
+
+
+
+
+ Character Animations
+
+
+ Character Properties
+
+ New Character
+ Edit Character Info
+
+
+ {0} Animations
+ Flipped: {0}
+ Sprite: {0}
+ Anim: {0}
+ Offset: ({0}, {1})
+
+ Invalid Character
Stage Editor
-
+
+ UI Debug State
+
+
+
+ Debug Options
+
\ No newline at end of file
diff --git a/source/funkin/backend/utils/TranslationUtil.hx b/source/funkin/backend/utils/TranslationUtil.hx
index 649b4bc1..13f72a8f 100644
--- a/source/funkin/backend/utils/TranslationUtil.hx
+++ b/source/funkin/backend/utils/TranslationUtil.hx
@@ -258,6 +258,7 @@ final class TranslationUtil
if(leMap.exists(id)) continue;
var value:String = node.has.string ? node.att.string : node.innerData;
if(node.getAtt("notrim").getDefault("true") != "true") value = value.trim();
+ // make it so you can escape the backslash
value = value.replace("\\n", "\n").replace("\r", ""); // remove stupid windows line breaks and convert newline literals to newlines
leMap.set(id, FormatUtil.get(value));
//leMap.set(id, FormatUtil.getStr("{" + id + "}"));
diff --git a/source/funkin/editors/EditorPicker.hx b/source/funkin/editors/EditorPicker.hx
index 6a877a99..1d9768e3 100644
--- a/source/funkin/editors/EditorPicker.hx
+++ b/source/funkin/editors/EditorPicker.hx
@@ -15,27 +15,27 @@ class EditorPicker extends MusicBeatSubstate {
},
{
name: "Character Editor",
- id: "character",
+ id: "characterEditor",
iconID: 1,
state: funkin.editors.character.CharacterSelection
},
{
name: "Stage Editor",
- id: "stage",
+ id: "stageEditor",
iconID: 2,
state: null
},
#if (debug || debug_ui)
{
name: "UI Debug State",
- id: "ui-debug",
+ id: "uiDebug",
iconID: 3,
state: UIDebugState
},
#end
{
name: "Debug Options",
- id: "debug-options",
+ id: "debugOptions",
iconID: 4,
state: DebugOptions
}
@@ -71,7 +71,8 @@ class EditorPicker extends MusicBeatSubstate {
optionHeight = FlxG.height / options.length;
for(k=>o in options) {
- var spr = new EditorPickerOption(o.name, o.iconID, optionHeight);
+ var visualName = o.name;
+ var spr = new EditorPickerOption(visualName, o.iconID, optionHeight);
spr.y = k * optionHeight;
add(spr);
sprites.push(spr);
diff --git a/source/funkin/editors/character/CharacterAnimScreen.hx b/source/funkin/editors/character/CharacterAnimScreen.hx
index 8d691c42..9968a11e 100644
--- a/source/funkin/editors/character/CharacterAnimScreen.hx
+++ b/source/funkin/editors/character/CharacterAnimScreen.hx
@@ -26,6 +26,9 @@ class CharacterAnimScreen extends UISubstateWindow {
super();
}
+ inline function translate(id:String, ?args:Array)
+ return TU.translate("characterAnimScreen." + id, args);
+
public override function create() {
var creatingAnim:Bool = animData == null;
@@ -41,7 +44,7 @@ class CharacterAnimScreen extends UISubstateWindow {
indices: []
};
- winTitle = creatingAnim ? 'Creating Animation' : 'Animation ${animData.name} properties';
+ winTitle = translate("win-title-" + (creatingAnim ? "creating" : "editing"), [animData.name]);
winWidth = 690; winHeight = 314;
super.create();
@@ -50,45 +53,45 @@ class CharacterAnimScreen extends UISubstateWindow {
add(new UIText(ui.x, ui.y - 24, 0, text));
var title:UIText;
- add(title = new UIText(windowSpr.x + 20, windowSpr.y + 30 + 16, 0, creatingAnim ? "Create New Animation" : "Edit Animation Properties", 28));
+ add(title = new UIText(windowSpr.x + 20, windowSpr.y + 30 + 16, 0, translate("title-" + (creatingAnim ? "creating" : "editing")), 28));
nameTextBox = new UITextBox(title.x, title.y + title.height + 38, animData.name, 160);
add(nameTextBox);
- addLabelOn(nameTextBox, "Name");
+ addLabelOn(nameTextBox, translate("name"));
animTextBox = new UITextBox(nameTextBox.x + 160 + 26, nameTextBox.y, animData.anim, 200);
add(animTextBox);
- addLabelOn(animTextBox, "Animation");
+ addLabelOn(animTextBox, translate("anim"));
fpsStepper = new UINumericStepper(animTextBox.x + 200 + 26, animTextBox.y, animData.fps, 0.1, 2, 1, 100, 82);
add(fpsStepper);
- addLabelOn(fpsStepper, "FPS");
+ addLabelOn(fpsStepper, translate("fps"));
- loopedCheckbox = new UICheckbox(fpsStepper.x + 82 - 32 + 26, fpsStepper.y, "Looped", animData.loop);
+ loopedCheckbox = new UICheckbox(fpsStepper.x + 82 - 32 + 26, fpsStepper.y, translate("looped"), animData.loop);
add(loopedCheckbox);
- addLabelOn(loopedCheckbox, "Looping");
+ addLabelOn(loopedCheckbox, translate("looping"));
loopedCheckbox.x += 8; loopedCheckbox.y += 6;
indicesTextBox = new UITextBox(nameTextBox.x, nameTextBox.y + 32 + 40, animData.indices.join(", "), 270);
add(indicesTextBox);
- addLabelOn(indicesTextBox, "Indices");
+ addLabelOn(indicesTextBox, translate("indices"));
offsetXStepper = new UINumericStepper(indicesTextBox.x + 270 + 26, indicesTextBox.y, animData.x, 0.001, 2, null, null, 84);
add(offsetXStepper);
- addLabelOn(offsetXStepper, "Offset (X,Y)");
+ addLabelOn(offsetXStepper, translate("offset"));
add(new UIText(offsetXStepper.x + 84 - 32 + 0, offsetXStepper.y + 9, 0, ",", 22));
offsetYStepper = new UINumericStepper(offsetXStepper.x + 84 - 32 + 26, offsetXStepper.y, animData.y, 0.001, 2, null, null, 84);
add(offsetYStepper);
- saveButton = new UIButton(windowSpr.x + windowSpr.bWidth - 20 - 125, windowSpr.y + windowSpr.bHeight - 16 - 32, "Save & Close", function() {
+ saveButton = new UIButton(windowSpr.x + windowSpr.bWidth - 20 - 125, windowSpr.y + windowSpr.bHeight - 16 - 32, TU.translate("editor.saveClose"), function() {
saveAnimData();
close();
}, 125);
add(saveButton);
- closeButton = new UIButton(saveButton.x - 20, saveButton.y, creatingAnim ? "Cancel" : "Close", function() {
+ closeButton = new UIButton(saveButton.x - 20, saveButton.y, TU.translate("editor." + (creatingAnim ? "cancel" : "close")), function() {
if (creatingAnim && onSave != null) onSave(null);
close();
}, 125);
@@ -109,7 +112,7 @@ class CharacterAnimScreen extends UISubstateWindow {
animType: NONE,
x: offsetXStepper.value,
y: offsetYStepper.value,
- indices: []
+ indices: []
};
var indicesSplit = indicesTextBox.label.text.split(",");
for(indice in indicesSplit) {
diff --git a/source/funkin/editors/character/CharacterEditor.hx b/source/funkin/editors/character/CharacterEditor.hx
index a0dbaef8..9d9e80d9 100644
--- a/source/funkin/editors/character/CharacterEditor.hx
+++ b/source/funkin/editors/character/CharacterEditor.hx
@@ -29,7 +29,7 @@ class CharacterEditor extends UIState {
public var uiGroup:FlxTypedGroup = new FlxTypedGroup();
// WINDOWS
- public var characterPropertiresWindow:CharacterPropertiesWindow;
+ public var characterPropertiesWindow:CharacterPropertiesWindow;
public var characterAnimsWindow:UIButtonList;
// camera for the character itself so that it can be unzoomed/zoomed in again
@@ -46,159 +46,162 @@ class CharacterEditor extends UIState {
if (character != null) __character = character;
}
+ inline function translate(id:String, ?args:Array)
+ return TU.translate("characterEditor." + id, args);
+
public override function create() {
super.create();
- WindowUtils.suffix = " (Character Editor)";
+ WindowUtils.suffix = " (" + translate("name") + ")";
SaveWarning.selectionClass = CharacterSelection;
SaveWarning.saveFunc = () -> {_file_save(null);};
topMenu = [
{
- label: "File",
+ label: translate("topBar.file"),
childs: [
{
- label: "New",
+ label: translate("file.new"),
onSelect: _file_new,
},
null,
{
- label: "Save",
+ label: translate("file.save"),
keybind: [CONTROL, S],
onSelect: _file_save,
},
{
- label: "Save As...",
+ label: translate("file.saveAs"),
keybind: [CONTROL, SHIFT, S],
onSelect: _file_saveas,
},
null,
{
- label: "Exit",
+ label: translate("file.exit"),
onSelect: _file_exit
}
]
},
{
- label: "Edit",
+ label: translate("topBar.edit"),
childs: [
{
- label: "Undo",
+ label: translate("edit.undo"),
keybind: [CONTROL, Z],
onSelect: _edit_undo
},
{
- label: "Redo",
+ label: translate("edit.redo"),
keybinds: [[CONTROL, Y], [CONTROL, SHIFT, Z]],
onSelect: _edit_redo
}
]
},
{
- label: "Character",
+ label: translate("topBar.character"),
childs: [
{
- label: "New Animation",
+ label: translate("character.newAnim"),
keybind: [CONTROL, N],
onSelect: _char_add_anim,
},
{
- label: "Edit Animation",
+ label: translate("character.editAnim"),
onSelect: _char_edit_anim,
},
{
- label: "Delete Animation",
+ label: translate("character.deleteAnim"),
keybind: [DELETE],
onSelect: _char_remove_anim,
},
null,
{
- label: "Edit Info",
+ label: translate("character.editInfo"),
onSelect: _char_edit_info,
}
]
},
{
- label: "Playback",
+ label: translate("topBar.playback"),
childs: [
{
- label: "Play Animation",
+ label: translate("playback.play"),
keybind: [SPACE],
onSelect: _playback_play_anim,
},
{
- label: "Stop Animation",
+ label: translate("playback.stop"),
onSelect: _playback_stop_anim
}
]
},
{
- label: "Offsets",
+ label: translate("topBar.offset"),
childs: [
{
- label: "Move Left",
+ label: translate("offset.moveLeft"),
keybind: [LEFT],
onSelect: _offsets_left,
},
{
- label: "Move Up",
+ label: translate("offset.moveUp"),
keybind: [UP],
onSelect: _offsets_up,
},
{
- label: "Move Down",
+ label: translate("offset.moveDown"),
keybind: [DOWN],
onSelect: _offsets_down,
},
{
- label: "Move Right",
+ label: translate("offset.moveRight"),
keybind: [RIGHT],
onSelect: _offsets_right,
},
null,
{
- label: "Move Extra Left",
+ label: translate("offset.moveExtraLeft"),
keybind: [SHIFT, LEFT],
onSelect: _offsets_extra_left,
},
{
- label: "Move Extra Up",
+ label: translate("offset.moveExtraUp"),
keybind: [SHIFT, UP],
onSelect: _offsets_extra_up,
},
{
- label: "Move Extra Down",
+ label: translate("offset.moveExtraDown"),
keybind: [SHIFT, DOWN],
onSelect: _offsets_extra_down,
},
{
- label: "Move Extra Right",
+ label: translate("offset.moveExtraRight"),
keybind: [SHIFT, RIGHT],
onSelect: _offsets_extra_right,
},
null,
{
- label: "Clear Offsets",
+ label: translate("offset.clearOffsets"),
keybind: [CONTROL, R],
onSelect: _offsets_clear,
}
]
},
{
- label: "View",
+ label: translate("topBar.view"),
childs: [
{
- label: "Zoom in",
+ label: translate("view.zoomIn"),
keybind: [CONTROL, NUMPADPLUS],
onSelect: _view_zoomin
},
{
- label: "Zoom out",
+ label: translate("view.zoomOut"),
keybind: [CONTROL, NUMPADMINUS],
onSelect: _view_zoomout
},
{
- label: "Reset zoom",
+ label: translate("view.resetZoom"),
keybind: [CONTROL, NUMPADZERO],
onSelect: _view_zoomreset
},
@@ -237,10 +240,10 @@ class CharacterEditor extends UIState {
topMenuSpr = new UITopMenu(topMenu);
topMenuSpr.cameras = uiGroup.cameras = [uiCamera];
- characterPropertiresWindow = new CharacterPropertiesWindow();
- uiGroup.add(characterPropertiresWindow);
+ characterPropertiesWindow = new CharacterPropertiesWindow();
+ uiGroup.add(characterPropertiesWindow);
- characterAnimsWindow = new UIButtonList(777, 209, 473, 488, "Character Animations", FlxPoint.get(429, 32));
+ characterAnimsWindow = new UIButtonList(777, 209, 473, 488, translate("characterAnimsWindow.name"), FlxPoint.get(429, 32));
characterAnimsWindow.addButton.callback = function() CharacterEditor.instance.createAnimWithUI();
var animOrder = character.getAnimOrder();
for (i=>anim in animOrder)
@@ -284,9 +287,16 @@ class CharacterEditor extends UIState {
}
if (character != null)
- characterPropertiresWindow.characterInfo.text = '${character.getNameList().length} Animations\nFlipped: ${character.flipX}\nSprite: ${character.sprite}\nAnim: ${character.getAnimName()}\nOffset: (${character.frameOffset.x}, ${character.frameOffset.y})';
+ characterPropertiesWindow.characterInfo.text = [
+ translate("info.animations", [character.getNameList().length]),
+ translate("info.flipped", [character.flipX]),
+ translate("info.sprite", [character.sprite]),
+ translate("info.anim", [character.getAnimName()]),
+ translate("info.offset", [character.frameOffset.x, character.frameOffset.y])
+ ].join('\n');
+ else characterPropertiesWindow.characterInfo.text = translate("info.invalidCharacter");
- if (!(characterPropertiresWindow.hovered || characterAnimsWindow.hovered) && !characterAnimsWindow.dragging) {
+ if (!(characterPropertiesWindow.hovered || characterAnimsWindow.hovered) && !characterAnimsWindow.dragging) {
if (FlxG.mouse.wheel != 0) {
zoom += 0.25 * FlxG.mouse.wheel;
__camZoom = Math.pow(2, zoom);
diff --git a/source/funkin/editors/character/CharacterInfoScreen.hx b/source/funkin/editors/character/CharacterInfoScreen.hx
index 8def0fd8..dfc3f655 100644
--- a/source/funkin/editors/character/CharacterInfoScreen.hx
+++ b/source/funkin/editors/character/CharacterInfoScreen.hx
@@ -36,8 +36,11 @@ class CharacterInfoScreen extends UISubstateWindow {
super();
}
+ inline function translate(id:String, ?args:Array)
+ return TU.translate("characterInfoScreen." + id, args);
+
public override function create() {
- winTitle = "Editing Character";
+ winTitle = translate("win-title");
winWidth = 1014;
winHeight = 600;
@@ -47,40 +50,40 @@ class CharacterInfoScreen extends UISubstateWindow {
add(new UIText(ui.x, ui.y - 24, 0, text));
var title:UIText;
- add(title = new UIText(windowSpr.x + 20, windowSpr.y + 30 + 16, 0, "Sprite Data", 28));
+ add(title = new UIText(windowSpr.x + 20, windowSpr.y + 30 + 16, 0, translate("spriteData"), 28));
spriteTextBox = new UITextBox(title.x, title.y + title.height + 38, character.sprite, 200);
add(spriteTextBox);
- addLabelOn(spriteTextBox, "Sprite");
+ addLabelOn(spriteTextBox, translate("sprite"));
iconTextBox = new UITextBox(spriteTextBox.x + 200 + 26, spriteTextBox.y, character.getIcon(), 150);
iconTextBox.onChange = (newIcon:String) -> {updateIcon(newIcon);}
add(iconTextBox);
- addLabelOn(iconTextBox, "Icon");
+ addLabelOn(iconTextBox, translate("icon"));
updateIcon(character.getIcon());
gameOverCharTextBox = new UITextBox(iconTextBox.x + 150 + (75 + 12), iconTextBox.y, character.gameOverCharacter, 200);
add(gameOverCharTextBox);
- addLabelOn(gameOverCharTextBox, "Game Over Character");
+ addLabelOn(gameOverCharTextBox, translate("gameOverChar"));
- antialiasingCheckbox = new UICheckbox(spriteTextBox.x, spriteTextBox.y + 10 + 32 + 28, "Antialiasing", character.antialiasing);
+ antialiasingCheckbox = new UICheckbox(spriteTextBox.x, spriteTextBox.y + 10 + 32 + 28, translate("antialiasing"), character.antialiasing);
add(antialiasingCheckbox);
- addLabelOn(antialiasingCheckbox, "Antialiased");
+ addLabelOn(antialiasingCheckbox, translate("antialiased"));
- flipXCheckbox = new UICheckbox(antialiasingCheckbox.x + 172, spriteTextBox.y + 10 + 32 + 28, "FlipX", character.flipX);
+ flipXCheckbox = new UICheckbox(antialiasingCheckbox.x + 172, spriteTextBox.y + 10 + 32 + 28, translate("flipX"), character.flipX);
add(flipXCheckbox);
- addLabelOn(flipXCheckbox, "Flipped");
+ addLabelOn(flipXCheckbox, translate("flipped"));
iconColorWheel = new UIColorwheel(gameOverCharTextBox.x + 200 + 20, gameOverCharTextBox.y, character.iconColor);
add(iconColorWheel);
- addLabelOn(iconColorWheel, "Icon Color");
+ addLabelOn(iconColorWheel, translate("iconColor"));
- add(title = new UIText(spriteTextBox.x, spriteTextBox.y + 10 + 46 + 84, 0, "Character Data", 28));
+ add(title = new UIText(spriteTextBox.x, spriteTextBox.y + 10 + 46 + 84, 0, translate("characterData"), 28));
positionXStepper = new UINumericStepper(title.x, title.y + title.height + 36, character.globalOffset.x, 0.001, 2, null, null, 84);
add(positionXStepper);
- addLabelOn(positionXStepper, "Position (X,Y)");
+ addLabelOn(positionXStepper, translate("position"));
add(new UIText(positionXStepper.x + 84 - 32 + 0, positionXStepper.y + 9, 0, ",", 22));
@@ -89,7 +92,7 @@ class CharacterInfoScreen extends UISubstateWindow {
cameraXStepper = new UINumericStepper(positionYStepper.x + 36 + 84 - 32, positionYStepper.y, character.cameraOffset.x, 0.001, 2, null, null, 84);
add(cameraXStepper);
- addLabelOn(cameraXStepper, "Camera Position (X,Y)");
+ addLabelOn(cameraXStepper, translate("cameraPosition"));
add(new UIText(cameraXStepper.x + 84 - 32 + 0, cameraXStepper.y + 9, 0, ",", 22));
@@ -98,11 +101,11 @@ class CharacterInfoScreen extends UISubstateWindow {
scaleStepper = new UINumericStepper(cameraYStepper.x + 84 - 32 + 90, cameraYStepper.y, character.scale.x, 0.001, 2, null, null, 74);
add(scaleStepper);
- addLabelOn(scaleStepper, "Scale");
+ addLabelOn(scaleStepper, translate("scale"));
singTimeStepper = new UINumericStepper(scaleStepper.x + 74 - 32 + 36, scaleStepper.y, character.holdTime, 0.001, 2, null, null, 74);
add(singTimeStepper);
- addLabelOn(singTimeStepper, "Sing Duration (Steps)");
+ addLabelOn(singTimeStepper, translate("singDuration"));
customPropertiesButtonList = new UIButtonList(singTimeStepper.x + singTimeStepper.width + 200, singTimeStepper.y, 290, 200, '', FlxPoint.get(280, 35), null, 5);
customPropertiesButtonList.frames = Paths.getFrames('editors/ui/inputbox');
@@ -113,27 +116,25 @@ class CharacterInfoScreen extends UISubstateWindow {
for (prop=>val in character.extra)
customPropertiesButtonList.add(new PropertyButton(prop, val, customPropertiesButtonList));
add(customPropertiesButtonList);
- addLabelOn(customPropertiesButtonList, "Custom Values (Advanced)");
+ addLabelOn(customPropertiesButtonList, translate("customValues"));
- isPlayerCheckbox = new UICheckbox(positionXStepper.x, positionXStepper.y + 10 + 32 + 28, "isPlayer", character.playerOffsets);
+ isPlayerCheckbox = new UICheckbox(positionXStepper.x, positionXStepper.y + 10 + 32 + 28, translate("isPlayer"), character.playerOffsets);
add(isPlayerCheckbox);
- addLabelOn(isPlayerCheckbox, "Is Player");
- isGFCheckbox = new UICheckbox(isPlayerCheckbox.x + 128, positionXStepper.y + 10 + 32 + 28, "isGF", false);
+ isGFCheckbox = new UICheckbox(isPlayerCheckbox.x + 128, positionXStepper.y + 10 + 32 + 28, translate("isGF"), false);
add(isGFCheckbox);
- addLabelOn(isGFCheckbox, "Is GF");
for (checkbox in [isPlayerCheckbox, isGFCheckbox, antialiasingCheckbox, flipXCheckbox])
{checkbox.y += 4; checkbox.x += 6;}
- saveButton = new UIButton(windowSpr.x + windowSpr.bWidth - 20, windowSpr.y + windowSpr.bHeight- 20, "Save & Close", function() {
+ saveButton = new UIButton(windowSpr.x + windowSpr.bWidth - 20, windowSpr.y + windowSpr.bHeight- 20, TU.translate("editor.saveClose"), function() {
saveCharacterInfo();
close();
}, 125);
saveButton.x -= saveButton.bWidth;
saveButton.y -= saveButton.bHeight;
- closeButton = new UIButton(saveButton.x - 20, saveButton.y, "Close", function() {
+ closeButton = new UIButton(saveButton.x - 20, saveButton.y, TU.translate("editor.close"), function() {
if (onSave != null) onSave(null);
close();
}, 125);
diff --git a/source/funkin/editors/character/CharacterPropertiesWindow.hx b/source/funkin/editors/character/CharacterPropertiesWindow.hx
index 4ffe5329..bb1fe6ae 100644
--- a/source/funkin/editors/character/CharacterPropertiesWindow.hx
+++ b/source/funkin/editors/character/CharacterPropertiesWindow.hx
@@ -1,3 +1,4 @@
+
package funkin.editors.character;
import flixel.util.FlxColor;
@@ -8,19 +9,22 @@ class CharacterPropertiesWindow extends UIWindow {
public var characterInfo:UIText;
- public function new() {
- super(800-23,23 + 23, 450 + 23, 140, "Character Properties");
+ inline function translate(id:String, ?args:Array)
+ return TU.translate("characterEditor.characterPropertiesWindow." + id, args);
- newButton = new UIButton( x +(450 + 23)- 25 - 3 - 200, y + 12 + 31, "New Character", null, 200);
+ public function new() {
+ super(800-23,23 + 23, 450 + 23, 140, translate("name"));
+
+ newButton = new UIButton( x +(450 + 23)- 25 - 3 - 200, y + 12 + 31, translate("newCharacter"), null, 200);
members.push(newButton);
newButton.color = FlxColor.GREEN;
- editButton = new UIButton(newButton.x, newButton.y + 12 + 30 + 4, "Edit Character Info", function () {
+ editButton = new UIButton(newButton.x, newButton.y + 12 + 30 + 4, translate("editCharacter"), function () {
CharacterEditor.instance.editInfoWithUI();
}, 200);
members.push(editButton);
- characterInfo = new UIText(x + 450 + 20 - 42 - 400, y + 36 + 10, 400, "0 Animations:\nFlipped:\nSprite:\nAnim:\nOffset: (,)");
+ characterInfo = new UIText(x + 450 + 20 - 42 - 400, y + 36 + 10, 400, "");
characterInfo.alignment = LEFT;
members.push(characterInfo);
}
diff --git a/source/funkin/editors/character/CharacterSelection.hx b/source/funkin/editors/character/CharacterSelection.hx
index eb9a1e3a..4416a1ae 100644
--- a/source/funkin/editors/character/CharacterSelection.hx
+++ b/source/funkin/editors/character/CharacterSelection.hx
@@ -8,6 +8,9 @@ import funkin.options.type.OptionType;
class CharacterSelection extends EditorTreeMenu
{
+ inline function translate(id:String, ?args:Array)
+ return TU.translate("characterSelection." + id, args);
+
public override function create()
{
bgType = "charter";
@@ -17,19 +20,20 @@ class CharacterSelection extends EditorTreeMenu
var list:Array = [
for (char in (modsList.length == 0 ? Character.getList(false) : modsList))
- new IconOption(char, "Press ACCEPT to edit this character.", Character.getIconFromCharName(char),
+ new IconOption(char, translate("acceptCharacter"), Character.getIconFromCharName(char),
function() {
FlxG.switchState(new CharacterEditor(char));
})
];
- list.insert(0, new NewOption("New Character", "New Character", function() {
- openSubState(new UIWarningSubstate("New Character: Feature Not Implemented!", "This feature isnt implemented yet. Please wait for more cne updates to have this functional.\n\n\n- Codename Devs", [
- {label: "Ok", color: 0xFFFF0000, onClick: function(t) {}}
+ var newChar = translate("newCharacter");
+ list.insert(0, new NewOption(newChar, newChar, function() {
+ openSubState(new UIWarningSubstate(translate("warnings.notImplemented-title"), translate("warnings.notImplemented-body"), [
+ {label: TU.translate("editor.ok"), color: 0xFFFF0000, onClick: function(t) {}}
]));
}));
- main = new OptionsScreen("Character Editor", "Select a character to edit", list);
+ main = new OptionsScreen(TU.translate("characterEditor.name"), translate("desc"), list);
DiscordUtil.call("onEditorTreeLoaded", ["Character Editor"]);
}
diff --git a/source/funkin/editors/charter/CharterSelection.hx b/source/funkin/editors/charter/CharterSelection.hx
index e7cde686..3f3ae6f6 100644
--- a/source/funkin/editors/charter/CharterSelection.hx
+++ b/source/funkin/editors/charter/CharterSelection.hx
@@ -26,11 +26,11 @@ class CharterSelection extends EditorTreeMenu {
freeplayList = FreeplaySonglist.get(false);
var list:Array = [
- for(s in freeplayList.songs) new EditorIconOption(s.name, TU.translate("charterSelection.accept-song"), s.icon, function() {
+ for(s in freeplayList.songs) new EditorIconOption(s.name, TU.translate("charterSelection.acceptSong"), s.icon, function() {
curSong = s;
var list:Array = [
for(d in s.difficulties) if (d != "")
- new TextOption(d, TU.translate("charterSelection.accept-difficulty"), function() {
+ new TextOption(d, TU.translate("charterSelection.acceptDifficulty"), function() {
FlxG.switchState(new Charter(s.name, d));
})
];
@@ -117,11 +117,11 @@ class CharterSelection extends EditorTreeMenu {
#end
// duplicated code, todo: fix this
- var option = new EditorIconOption(creation.meta.name, TU.translate("charterSelection.accept-song"), creation.meta.icon, function() {
+ var option = new EditorIconOption(creation.meta.name, TU.translate("charterSelection.acceptSong"), creation.meta.icon, function() {
curSong = creation.meta;
var list:Array = [
for(d in creation.meta.difficulties)
- if (d != "") new TextOption(d, TU.translate("charterSelection.accept-difficulty"), function() {
+ if (d != "") new TextOption(d, TU.translate("charterSelection.acceptDifficulty"), function() {
FlxG.switchState(new Charter(creation.meta.name, d));
})
];
@@ -156,7 +156,7 @@ class CharterSelection extends EditorTreeMenu {
// Add to List
// duplicated code, todo: fix this
curSong.difficulties.push(name);
- var option = new TextOption(name, TU.translate("charterSelection.accept-difficulty"), function() {
+ var option = new TextOption(name, TU.translate("charterSelection.acceptDifficulty"), function() {
FlxG.switchState(new Charter(curSong.name, name));
});
optionsTree.members[optionsTree.members.length-1].insert(optionsTree.members[optionsTree.members.length-1].length-1, option);