Cleanup
This commit is contained in:
@@ -271,7 +271,7 @@
|
||||
"Error: Mesh has no UVs, generating defaults": "Fehler: Mesh hat keine UVs, sodass Vorgabewerte erzeugt werden",
|
||||
"Error: Check internet connection to access the cloud": "Fehler: Internetverbindung für den Cloudzugriff prüfen",
|
||||
"Info: Asset already imported": "Info: Asset bereits importiert",
|
||||
"Textures exported.": "Texturen exportiert.",
|
||||
"Textures exported": "Texturen exportiert.",
|
||||
"Folder does not contain textures": "Ordner enthält keine Texturen",
|
||||
"Not a valid GIMP color palette": "Keine korrekte GIMP-Farbpalette",
|
||||
"Keymap imported:": "Tastenbelegung importiert:",
|
||||
@@ -479,7 +479,7 @@
|
||||
"Picked Color": "Gewählte Farbe",
|
||||
"Color ID Map": "Color ID Map",
|
||||
"Color ID": "Farb ID",
|
||||
"Drag and drop picked color to swatches, materials, layers or to the node editor.": "Gewählte Farbe per Drag & Drop in Farbfeldern, Materialien, Ebenen pder dem Node Editor ablegen.",
|
||||
"Drag and drop picked color to swatches, materials, layers or to the node editor": "Gewählte Farbe per Drag & Drop in Farbfeldern, Materialien, Ebenen pder dem Node Editor ablegen.",
|
||||
"Add Swatch": "Farbfeld hinzufügen",
|
||||
"Add picked color to swatches": "Gewählte Farbe zu Farbfeldern hinzufügen",
|
||||
"Base": "Basis",
|
||||
|
||||
@@ -271,7 +271,7 @@
|
||||
"Error: Mesh has no UVs, generating defaults": "エラー: メッシュにUVがなく、デフォルトが生成されます",
|
||||
"Error: Check internet connection to access the cloud": "エラー: クラウドにアクセスするにはインターネット接続を確認してください",
|
||||
"Info: Asset already imported": "情報: アセットはすでにインポートされています",
|
||||
"Textures exported.": "エクスポートされたテクスチャ",
|
||||
"Textures exported": "エクスポートされたテクスチャ",
|
||||
"Folder does not contain textures": "フォルダーにテクスチャが含まれていません",
|
||||
"Not a valid GIMP color palette": "有効なGIMPカラーパレットではありません",
|
||||
"Keymap imported:": "インポートされたキーマップ:",
|
||||
@@ -481,7 +481,7 @@
|
||||
"Picked Color": "選択した色",
|
||||
"Color ID Map": "カラーIDマップ",
|
||||
"Color ID": "カラーID",
|
||||
"Drag and drop picked color to swatches, materials, layers or to the node editor.": "選択した色をスウォッチ、マテリアル、レイヤー、またはノードエディタにドラッグアンドドロップします",
|
||||
"Drag and drop picked color to swatches, materials, layers or to the node editor": "選択した色をスウォッチ、マテリアル、レイヤー、またはノードエディタにドラッグアンドドロップします",
|
||||
"Add Swatch": "スウォッチを追加",
|
||||
"Add picked color to swatches": "選択した色をスウォッチへ追加します",
|
||||
"Base": "ベース",
|
||||
|
||||
@@ -176,7 +176,7 @@ class ExportArm {
|
||||
recent.unshift(recent_path);
|
||||
Config.save();
|
||||
|
||||
Console.info("Project saved.");
|
||||
Console.info(tr("Project saved"));
|
||||
}
|
||||
|
||||
static function exportNode(n: TNode, assets: Array<TAsset> = null) {
|
||||
|
||||
@@ -90,9 +90,9 @@ class ExportTexture {
|
||||
#end
|
||||
|
||||
#if krom_ios
|
||||
Console.info(tr("Textures exported.") + " ('Files/On My iPad/" + Main.title + "')");
|
||||
Console.info(tr("Textures exported") + " ('Files/On My iPad/" + Main.title + "')");
|
||||
#else
|
||||
Console.info(tr("Textures exported."));
|
||||
Console.info(tr("Textures exported"));
|
||||
#end
|
||||
@:privateAccess UIFiles.lastPath = "";
|
||||
}
|
||||
|
||||
+34
-34
@@ -9,45 +9,45 @@ class ImportGpl {
|
||||
|
||||
public static function run(path: String, replaceExisting: Bool) {
|
||||
Data.getBlob(path, function(b: Blob) {
|
||||
var swatches = [];
|
||||
try {
|
||||
var input = new BytesInput(b.bytes);
|
||||
// GIMP's color palette importer: https://gitlab.gnome.org/GNOME/gimp/-/blob/gimp-2-10/app/core/gimppalette-load.c#L39
|
||||
if (!input.readLine().startsWith("GIMP Palette")) {
|
||||
Console.error(tr("Not a valid GIMP color palette"));
|
||||
return;
|
||||
}
|
||||
var swatches = [];
|
||||
try {
|
||||
var input = new BytesInput(b.bytes);
|
||||
// GIMP's color palette importer: https://gitlab.gnome.org/GNOME/gimp/-/blob/gimp-2-10/app/core/gimppalette-load.c#L39
|
||||
if (!input.readLine().startsWith("GIMP Palette")) {
|
||||
Console.error(tr("Not a valid GIMP color palette"));
|
||||
return;
|
||||
}
|
||||
|
||||
var delimiter = ~/\s+/ig;
|
||||
while (true) {
|
||||
var line = input.readLine();
|
||||
if (line.startsWith("Name:")) continue;
|
||||
else if (line.startsWith("Columns:")) continue;
|
||||
else if (line.startsWith("#")) continue;
|
||||
else {
|
||||
var tokens = delimiter.split(line);
|
||||
if (tokens.length < 3) continue;
|
||||
var swatch = Project.makeSwatch(Color.fromBytes(Std.parseInt(tokens[0]), Std.parseInt(tokens[1]), Std.parseInt(tokens[2])));
|
||||
swatches.push(swatch);
|
||||
var delimiter = ~/\s+/ig;
|
||||
while (true) {
|
||||
var line = input.readLine();
|
||||
if (line.startsWith("Name:")) continue;
|
||||
else if (line.startsWith("Columns:")) continue;
|
||||
else if (line.startsWith("#")) continue;
|
||||
else {
|
||||
var tokens = delimiter.split(line);
|
||||
if (tokens.length < 3) continue;
|
||||
var swatch = Project.makeSwatch(Color.fromBytes(Std.parseInt(tokens[0]), Std.parseInt(tokens[1]), Std.parseInt(tokens[2])));
|
||||
swatches.push(swatch);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e: haxe.io.Eof) {
|
||||
// Is thrown if end of file is reached.
|
||||
}
|
||||
if (replaceExisting) {
|
||||
Project.raw.swatches = [];
|
||||
|
||||
if (swatches.length == 0) { // No swatches contained
|
||||
Project.raw.swatches.push(Project.makeSwatch());
|
||||
catch (e: haxe.io.Eof) {
|
||||
// Is thrown if end of file is reached
|
||||
}
|
||||
}
|
||||
if (replaceExisting) {
|
||||
Project.raw.swatches = [];
|
||||
|
||||
if (swatches.length > 0) {
|
||||
for (s in swatches) {
|
||||
Project.raw.swatches.push(s);
|
||||
if (swatches.length == 0) { // No swatches contained
|
||||
Project.raw.swatches.push(Project.makeSwatch());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (swatches.length > 0) {
|
||||
for (s in swatches) {
|
||||
Project.raw.swatches.push(s);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -566,7 +566,7 @@ plugin.drawUI = function(ui) {
|
||||
iron.data.Data.getBlob("plugins/" + f, function(blob: kha.Blob) {
|
||||
TabScript.hscript.text = blob.toString();
|
||||
iron.data.Data.deleteBlob("plugins/" + f);
|
||||
Console.info("Script opened");
|
||||
Console.info(tr("Script opened"));
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -207,14 +207,14 @@ class TabSwatches {
|
||||
}
|
||||
}
|
||||
|
||||
// Draw the rightmost line next to the last swatch.
|
||||
// Draw the rightmost line next to the last swatch
|
||||
if (App.dragSwatch != null && dragPosition == Project.raw.swatches.length) {
|
||||
ui._x = uix; // Reset the position because otherwise it would start in the row below
|
||||
ui._y = uiy;
|
||||
ui.fill(28, -2, 2, 32, ui.t.HIGHLIGHT_COL);
|
||||
}
|
||||
|
||||
// Currently there is no valid dragPosition so reset it.
|
||||
// Currently there is no valid dragPosition so reset it
|
||||
if (!dragPositionSet)
|
||||
dragPosition = -1;
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ class UIHeader {
|
||||
App.dragOffY = -(mouse.y - uiy - ui._windowY + 1);
|
||||
App.dragSwatch = Project.cloneSwatch(Context.pickedColor);
|
||||
}
|
||||
if (ui.isHovered) ui.tooltip(tr("Drag and drop picked color to swatches, materials, layers or to the node editor."));
|
||||
if (ui.isHovered) ui.tooltip(tr("Drag and drop picked color to swatches, materials, layers or to the node editor"));
|
||||
if (ui.isHovered && ui.inputReleased) {
|
||||
UIMenu.draw(function(ui) {
|
||||
ui.fill(0, 0, ui._w / ui.ops.scaleFactor, ui.t.ELEMENT_H * 9, ui.t.SEPARATOR_COL);
|
||||
|
||||
@@ -63,7 +63,7 @@ class UIMenu {
|
||||
if (menuButton(ui, tr("Import Envmap..."))) {
|
||||
UIFiles.show("hdr", false, false, function(path: String) {
|
||||
if (!path.endsWith(".hdr")) {
|
||||
Console.error("Error: .hdr file expected");
|
||||
Console.error(tr("Error: .hdr file expected"));
|
||||
return;
|
||||
}
|
||||
ImportAsset.run(path);
|
||||
|
||||
Reference in New Issue
Block a user