Skip to content

Commit aff8484

Browse files
committed
Strip whithespace optional when creating atlases.
1 parent 1fc686b commit aff8484

File tree

6 files changed

+17
-15
lines changed

6 files changed

+17
-15
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [3.1.2]
6+
7+
- Animated ui icons and cursors.
8+
- Update RoboVM to v2.3.7.
9+
- Don't extract string expresions from ink files for i18n.
10+
- Allow empty values in Property action.
11+
- Added public methods to the SpineRenderer to get access to the current skeleton and animation.
12+
513
## [3.1.1]
614

715
- Dialog to create the android keystore inside the editor.

adventure-editor/src/main/java/com/bladecoder/engineeditor/common/ImageUtils.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public static void scaleAtlas(File orgAtlas, File destDir, float scale) throws I
138138
int maxWH = (int) (getRecommendedAtlasSize() * scale);
139139

140140
createAtlas(tmpDir.getAbsolutePath(), destDir.getAbsolutePath(), orgAtlas.getName(), scale, maxWH, maxWH,
141-
atlasData.getPages().get(0).minFilter, atlasData.getPages().get(0).magFilter, outputFormat);
141+
atlasData.getPages().get(0).minFilter, atlasData.getPages().get(0).magFilter, outputFormat, true);
142142

143143
DesktopUtils.removeDir(tmpDir.getAbsolutePath());
144144
}
@@ -174,7 +174,8 @@ public static int getRecommendedAtlasSize() {
174174
}
175175

176176
public static void createAtlas(String inDir, String outdir, String name, float scale, int maxWidth, int maxHeight,
177-
TextureFilter filterMin, TextureFilter filterMag, String outputFormat) throws IOException {
177+
TextureFilter filterMin, TextureFilter filterMag, String outputFormat, boolean stripWhiteSpace)
178+
throws IOException {
178179
Settings settings = new Settings();
179180

180181
settings.pot = false;
@@ -185,8 +186,8 @@ public static void createAtlas(String inDir, String outdir, String name, float s
185186
settings.rotation = false;
186187
settings.minWidth = 16;
187188
settings.minWidth = 16;
188-
settings.stripWhitespaceX = true;
189-
settings.stripWhitespaceY = true;
189+
settings.stripWhitespaceX = stripWhiteSpace;
190+
settings.stripWhitespaceY = stripWhiteSpace;
190191
settings.alphaThreshold = 0;
191192

192193
settings.filterMin = filterMin;

adventure-editor/src/main/java/com/bladecoder/engineeditor/scneditor/ToolsWindow.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,6 @@ protected void createUIAtlas() {
228228

229229
@Override
230230
public void selected(Array<FileHandle> files) {
231-
// fileChooser.setTitle("Select the file to export the project
232-
// texts");
233-
234-
// ImageUtils.createAtlas(files.get(0).file().getAbsolutePath(),
235-
// Ctx.project.getProjectPath() + "/" + Project.UI_PATH + "/1/",
236-
// "ui", 1, TextureFilter.Linear,
237-
// TextureFilter.Nearest);
238231

239232
List<String> res = Ctx.project.getResolutions();
240233

@@ -246,7 +239,7 @@ public void selected(Array<FileHandle> files) {
246239

247240
ImageUtils.createAtlas(files.get(0).file().getAbsolutePath(),
248241
Ctx.project.getAssetPath() + Project.UI_PATH + "/" + r, "ui" + ".atlas", scale, maxWH,
249-
maxWH, TextureFilter.Linear, TextureFilter.Nearest, "png");
242+
maxWH, TextureFilter.Linear, TextureFilter.Nearest, "png", false);
250243
} catch (IOException e) {
251244
EditorLogger.error(e.getMessage());
252245
Message.showMsgDialog(getStage(), "Error creating atlas", e.getMessage());

adventure-editor/src/main/java/com/bladecoder/engineeditor/ui/CreateAtlasDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ else if (fMag.equals("MipMapNearestNearest"))
160160

161161
try {
162162
ImageUtils.createAtlas(dir.getText(), outdir + "/" + r, name + ".atlas", scale, (int) (maxW * scale),
163-
(int) (maxH * scale), filterMin, filterMag, outputFormat.getText());
163+
(int) (maxH * scale), filterMin, filterMag, outputFormat.getText(), true);
164164
} catch (IOException e) {
165165
EditorLogger.error(e.getMessage());
166166
Message.showMsgDialog(getStage(), "Error creating atlas", e.getMessage());

adventure-editor/src/main/resources/versions.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ buildToolsVersion=28.0.3
55
libgdxVersion=1.9.9
66
roboVMGradlePluginVersion=2.3.7
77
roboVMVersion=2.3.7
8-
version=3.1.2-SNAPSHOT
8+
version=3.1.2

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=3.1.2-SNAPSHOT
1+
version=3.1.2
22
libgdxVersion=1.9.9
33
roboVMVersion=2.3.7
44
roboVMGradlePluginVersion=2.3.7

0 commit comments

Comments
 (0)