Skip to content

Commit b22c29f

Browse files
committed
обновление версии и мелкие правки
1 parent b1bc388 commit b22c29f

File tree

6 files changed

+29
-17
lines changed

6 files changed

+29
-17
lines changed

build-native.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
name="jME3-SpaceShift-Editor"
128128
mainClass="com.ss.editor.Starter"
129129
toolkit="fx"
130-
version="0.7.3"
130+
version="0.7.4"
131131
/>
132132

133133
<mkdir dir="build/classes/META-INF"/>
@@ -140,7 +140,7 @@
140140
<manifest>
141141
<attribute name="Implementation-Vendor" value="spaceshift.ru"/>
142142
<attribute name="Implementation-Title" value="jME3 SpaceShift Editor"/>
143-
<attribute name="Implementation-Version" value="0.7.3"/>
143+
<attribute name="Implementation-Version" value="0.7.4"/>
144144
</manifest>
145145
</fx:jar>
146146

build/package/linux/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: jme3-spaceshift-editor
2-
Version: 0.7.3
2+
Version: 0.7.4
33
Section: tool
44
Maintainer: spaceshift.ru <[email protected]>
55
Priority: optional

src/com/ss/editor/config/Config.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public abstract class Config {
2020
public static final String CONFIG_RESOURCE_PATH = "/com/ss/editor/config/config.xml";
2121

2222
public static final String TITLE = "jME3 SpaceShift Editor";
23-
public static final String VERSION = "v.0.7.3";
23+
public static final String VERSION = "v.0.7.4";
2424

2525
public static final String SS_FOLDER_IN_USER_HOME = ".jme3-spaceshift-editor";
2626

src/com/ss/editor/config/EditorConfig.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
import com.ss.editor.util.EditorUtil;
1111

1212
import java.awt.*;
13+
import java.awt.image.BufferedImage;
14+
import java.io.IOException;
1315
import java.io.Serializable;
1416
import java.net.URI;
1517
import java.nio.file.Files;
@@ -20,6 +22,8 @@
2022
import java.util.prefs.BackingStoreException;
2123
import java.util.prefs.Preferences;
2224

25+
import javax.imageio.ImageIO;
26+
2327
import rlib.logging.Logger;
2428
import rlib.logging.LoggerManager;
2529

@@ -291,17 +295,31 @@ public AppSettings getSettings() {
291295
final GraphicsDevice device = graphicsEnvironment.getDefaultScreenDevice();
292296
final DisplayMode displayMode = device.getDisplayMode();
293297

298+
294299
final AppSettings settings = new AppSettings(true);
295300
settings.setRenderer("CUSTOM" + EditorContext.class.getName());
296301
settings.setTitle(Config.TITLE + " " + Config.VERSION);
297302
settings.setFullscreen(isFullscreen() && screenSize.isFullscreenSupported());
298303
settings.setResolution(screenSize.getWidth(), screenSize.getHeight());
299304
settings.setFrequency(displayMode.getRefreshRate());
300-
settings.setFrameRate(60);
301305
settings.setGammaCorrection(isGammaCorrection());
302306
settings.setResizable(true);
303307
// settings.putBoolean("GraphicsDebug", true);
304308

309+
try {
310+
311+
final BufferedImage[] icons = new BufferedImage[5];
312+
icons[0] = ImageIO.read(EditorUtil.getInputStream("/ui/icons/app/SSEd256.png"));
313+
icons[1] = ImageIO.read(EditorUtil.getInputStream("/ui/icons/app/SSEd128.png"));
314+
icons[2] = ImageIO.read(EditorUtil.getInputStream("/ui/icons/app/SSEd64.png"));
315+
icons[3] = ImageIO.read(EditorUtil.getInputStream("/ui/icons/app/SSEd32.png"));
316+
icons[4] = ImageIO.read(EditorUtil.getInputStream("/ui/icons/app/SSEd16.png"));
317+
318+
settings.setIcons(icons);
319+
} catch (final IOException e) {
320+
LOGGER.warning(e);
321+
}
322+
305323
return settings;
306324
}
307325

src/com/ss/editor/ui/event/FXEventManager.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import org.lwjgl.glfw.GLFW;
99
import org.lwjgl.glfw.GLFWWindowFocusCallback;
10-
import org.lwjgl.opengl.GL11;
1110

1211
import javafx.application.Platform;
1312
import javafx.event.Event;
@@ -55,10 +54,10 @@ private void initListener() {
5554
windowFocusCallback = new GLFWWindowFocusCallback() {
5655

5756
@Override
58-
public void invoke(final long window, final int focused) {
57+
public void invoke(final long window, final boolean focused) {
5958

6059
final WindowChangeFocusEvent event = new WindowChangeFocusEvent();
61-
event.setFocused(focused == GL11.GL_TRUE);
60+
event.setFocused(focused);
6261

6362
FXEventManager.this.notify(event);
6463
}

src/com/ss/editor/util/EditorUtil.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,7 @@ public static void openFileInExternalEditor(final Path path) {
318318
commands.add("xdg-open");
319319
}
320320

321-
if (commands.isEmpty()) {
322-
return;
323-
}
321+
if (commands.isEmpty()) return;
324322

325323
final String url;
326324
try {
@@ -362,17 +360,14 @@ public static byte[] serialize(final Serializable object) {
362360
* Десериализация объекта из массива байтов.
363361
*/
364362
public static <T> T deserialize(final byte[] bytes) {
365-
366-
if (bytes == null) {
367-
return null;
368-
}
363+
if (bytes == null) return null;
369364

370365
final ByteArrayInputStream bin = new ByteArrayInputStream(bytes);
371366

372367
try (final ObjectInputStream in = new ObjectInputStream(bin)) {
373368
return unsafeCast(in.readObject());
374-
} catch (ClassNotFoundException | IOException e) {
375-
e.printStackTrace();
369+
} catch (final ClassNotFoundException | IOException e) {
370+
LOGGER.warning(e);
376371
}
377372

378373
return null;

0 commit comments

Comments
 (0)