Skip to content

Commit 3dbe777

Browse files
committed
updated rlib.
1 parent fc83fec commit 3dbe777

4 files changed

Lines changed: 16 additions & 14 deletions

File tree

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ compileTestJava {
2626

2727
ext.jmeVersion = "3.2_branch-SNAPSHOT"
2828
ext.jme3_xbuf_version = '0.9.1'
29-
ext.lwjglVersion = "3.1.2"
29+
ext.lwjglVersion = "3.1.5"
3030
ext.junitPlatformVersion = "1.0.0"
3131
ext.junitJupiterVersion = "5.0.0"
3232
ext.log4jVersion = '2.6.2'
@@ -59,7 +59,7 @@ dependencies {
5959

6060
compile 'com.github.JavaSaBr:RlibFX:4.1.3'
6161
compile 'com.github.JavaSaBr:RLib:6.6.0'
62-
compile 'com.github.JavaSaBr:JME3-JFX:1.6.1'
62+
compile 'com.github.JavaSaBr:JME3-JFX:1.7.0'
6363

6464
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
6565
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.6'

src/main/java/com/ss/editor/model/EditorCamera.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ public void onAction(final String name, final boolean keyPressed, final float tp
285285
return;
286286
}
287287

288-
if (Config.DEV_CAMERA_DEBUG && LOGGER.isEnabledDebug()) {
289-
LOGGER.debug("Toggle camera " + keyPressed);
288+
if (Config.DEV_CAMERA_DEBUG) {
289+
LOGGER.debug(this, keyPressed, flag -> "Toggle camera " + flag);
290290
}
291291

292292
if (keyPressed) {

src/main/java/com/ss/editor/state/editor/impl/AdvancedAbstractEditor3DState.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.ss.editor.util.LocalObjects;
2222
import com.ss.rlib.function.BooleanFloatConsumer;
2323
import com.ss.rlib.function.FloatFloatConsumer;
24+
import com.ss.rlib.logging.LoggerLevel;
2425
import com.ss.rlib.util.dictionary.DictionaryFactory;
2526
import com.ss.rlib.util.dictionary.ObjectDictionary;
2627
import org.jetbrains.annotations.NotNull;
@@ -540,7 +541,7 @@ public boolean isCameraMoving() {
540541
@JMEThread
541542
private void startCameraMoving(final int key) {
542543

543-
if (Config.DEV_CAMERA_DEBUG && LOGGER.isEnabledDebug()) {
544+
if (Config.DEV_CAMERA_DEBUG && LOGGER.isEnabled(LoggerLevel.DEBUG)) {
544545
LOGGER.debug(this, "start camera moving[" + cameraMoving + "] for key " + key);
545546
}
546547

@@ -570,7 +571,7 @@ private void finishCameraMoving(final int key, final boolean force) {
570571

571572
final boolean[] cameraKeysState = getCameraKeysState();
572573

573-
if (Config.DEV_CAMERA_DEBUG && LOGGER.isEnabledDebug()) {
574+
if (Config.DEV_CAMERA_DEBUG && LOGGER.isEnabled(LoggerLevel.DEBUG)) {
574575
LOGGER.debug(this, "finish camera moving[" + cameraMoving + "] for key " + key + ", force = " + force);
575576
}
576577

src/main/java/com/ss/editor/ui/event/EventRedirector.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.ss.editor.ui.event;
22

3+
import static com.ss.rlib.util.ObjectUtils.notNull;
34
import com.ss.editor.config.Config;
45
import com.ss.editor.ui.component.editor.FileEditor;
56
import com.ss.editor.ui.component.editor.area.EditorAreaComponent;
@@ -172,8 +173,8 @@ private void redirect(@NotNull final InputEvent event) {
172173
return;
173174
} else if (target instanceof TextInputControl) {
174175
if (event instanceof KeyEvent && UIUtils.isNotHotKey((KeyEvent) event)) {
175-
if (Config.DEV_DEBUG_JFX_KEY_INPUT && LOGGER.isEnabledDebug()) {
176-
LOGGER.debug("Key event was skipped because it was from " + target);
176+
if (Config.DEV_DEBUG_JFX_KEY_INPUT) {
177+
LOGGER.debug(this, target, ev -> "Key event was skipped because it was from " + ev);
177178
}
178179
return;
179180
}
@@ -182,17 +183,17 @@ private void redirect(@NotNull final InputEvent event) {
182183
final EventType<? extends InputEvent> eventType = event.getEventType();
183184
final FileEditor currentEditor = editorAreaComponent.getCurrentEditor();
184185

185-
if (Config.DEV_DEBUG_JFX_KEY_INPUT && LOGGER.isEnabledDebug()) {
186-
LOGGER.debug("Key event " + event.getEventType() + " is inside " +
187-
currentEditor.isInside(getSceneX(), getSceneY(), event.getClass()));
186+
if (Config.DEV_DEBUG_JFX_KEY_INPUT) {
187+
LOGGER.debug(this, event, notNull(currentEditor), (red, ev, editor) -> "Key event " + ev.getEventType() +
188+
" is inside " + editor.isInside(red.getSceneX(), red.getSceneY(), ev.getClass()));
188189
}
189190

190191
if (currentEditor == null || eventType != KeyEvent.KEY_RELEASED && !currentEditor.isInside(getSceneX(), getSceneY(), event.getClass())) {
191192
return;
192193
}
193194

194-
if (Config.DEV_DEBUG_JFX_KEY_INPUT && LOGGER.isEnabledDebug()) {
195-
LOGGER.debug("Redirect event " + event);
195+
if (Config.DEV_DEBUG_JFX_KEY_INPUT) {
196+
LOGGER.debug(this, event, ev -> "Redirect event " + ev);
196197
}
197198

198199
Event.fireEvent(destination, event.copyFor(event.getSource(), destination));
@@ -201,7 +202,7 @@ private void redirect(@NotNull final InputEvent event) {
201202
/**
202203
* Update mouse coords.
203204
*/
204-
private void updateCoords(final MouseEvent event) {
205+
private void updateCoords(@NotNull final MouseEvent event) {
205206
this.sceneX = event.getSceneX();
206207
this.sceneY = event.getSceneY();
207208
}

0 commit comments

Comments
 (0)