Skip to content

Commit 8dd6c96

Browse files
committed
Merge branch 'master' into Issue#534-SceneComposer_panels_scrolls_with_mouse_movements
2 parents 4f261b2 + 93440a2 commit 8dd6c96

File tree

10 files changed

+148
-30
lines changed

10 files changed

+148
-30
lines changed

build.gradle

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ dependencies {
4444
corelibs dep("org.jmonkeyengine:jme3-lwjgl:$jmeVersion-$jmeVersionTag", true, true)
4545
corelibs dep("org.jmonkeyengine:jme3-effects:$jmeVersion-$jmeVersionTag", true, true)
4646
corelibs dep("org.jmonkeyengine:jme3-blender:3.3.2-stable", false, false) // Pin Pointed until jme3-blender has a dedicated release or support is phased out.
47-
optlibs dep("com.github.stephengold:Minie:7.1.0", false, false) // replacement for bullet-native
47+
optlibs dep("com.github.stephengold:Minie:7.7.0", false, false) // replacement for bullet-native
4848
corelibs dep(fileTree("lib"), false, false)
4949
corelibs dep("org.jmonkeyengine:jme3-jogg:$jmeVersion-$jmeVersionTag", true, true)
5050

@@ -53,13 +53,19 @@ dependencies {
5353
corelibs dep("org.jmonkeyengine:jme3-plugins:$jmeVersion-$jmeVersionTag", true, true)
5454
corelibs dep("org.jmonkeyengine:jme3-terrain:$jmeVersion-$jmeVersionTag", true, true)
5555

56+
optlibs dep("com.simsilica:lemur:1.16.0", true, true)
57+
optlibs dep("com.simsilica:lemur-props:1.2.0", true, true)
58+
optlibs dep("com.simsilica:sio2:1.8.0", true, true)
59+
optlibs dep("com.simsilica:sim-math:1.6.0", true, true)
60+
optlibs dep("com.simsilica:zay-es:1.5.0", true, true)
61+
5662
optlibs dep("org.jmonkeyengine:jme3-jbullet:$jmeVersion-$jmeVersionTag", true, true)
5763
optlibs dep("org.jmonkeyengine:jme3-android:$jmeVersion-$jmeVersionTag", true, true)
5864
optlibs dep("org.jmonkeyengine:jme3-ios:$jmeVersion-$jmeVersionTag", true, true)
5965
optlibs dep("org.jmonkeyengine:jme3-android-native:$jmeVersion-$jmeVersionTag", true, true)
6066
optlibs dep("org.jmonkeyengine:jme3-lwjgl3:$jmeVersion-$jmeVersionTag", true, true)
61-
optlibs dep("com.github.stephengold:Heart:8.2.0", true, true)
62-
optlibs dep("com.github.stephengold:Wes:0.7.2", true, true)
67+
optlibs dep("com.github.stephengold:Heart:8.7.0", true, true)
68+
optlibs dep("com.github.stephengold:Wes:0.7.5", true, true)
6369
testdatalibs dep("org.jmonkeyengine:jme3-testdata:$jmeVersion-$jmeVersionTag", false, false)
6470
examplelibs dep("org.jmonkeyengine:jme3-examples:$jmeVersion-$jmeVersionTag", false, true)
6571
}
@@ -609,14 +615,14 @@ task cleanSdk() {
609615
task extractPlatformIndependent(type: Copy) {
610616
from zipTree('dist/jmonkeyplatform.zip')
611617
into "dist/temp/"
612-
618+
613619
exclude("jmonkeyplatform/etc/jmonkeyplatform.conf")
614620
}
615621

616622
task patchPlatformIndependent(type: Copy, dependsOn: extractPlatformIndependent) {
617623
from zipTree('dist/jmonkeyplatform.zip')
618624
into "dist/temp/"
619-
625+
620626
include("jmonkeyplatform/etc/jmonkeyplatform.conf")
621627

622628
filter { String line ->

jme3-materialeditor/nbproject/project.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,15 @@
225225
</run-dependency>
226226
</dependency>
227227
</module-dependencies>
228+
<test-dependencies>
229+
<test-type>
230+
<name>unit</name>
231+
<test-dependency>
232+
<code-name-base>org.netbeans.libs.junit5</code-name-base>
233+
<compile-dependency/>
234+
</test-dependency>
235+
</test-type>
236+
</test-dependencies>
228237
<public-packages>
229238
<package>com.jme3.gde.materials</package>
230239
<package>com.jme3.gde.materials.multiview</package>

jme3-materialeditor/src/com/jme3/gde/materials/multiview/MaterialEditorTopComponent.form

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@
8787
<Group type="102" attributes="0">
8888
<Group type="103" groupAlignment="0" attributes="0">
8989
<Component id="materialPreviewWidget1" min="-2" pref="255" max="-2" attributes="0"/>
90-
<Component id="jTabbedPane3" max="32767" attributes="0"/>
90+
<Component id="optionsPane" max="32767" attributes="0"/>
9191
</Group>
9292
<EmptySpace max="-2" attributes="0"/>
9393
<Group type="103" groupAlignment="0" attributes="0">
9494
<Group type="102" alignment="0" attributes="0">
95-
<Component id="texturesAndColorsPane" pref="496" max="32767" attributes="0"/>
95+
<Component id="texturesAndColorsPane" max="32767" attributes="0"/>
9696
<EmptySpace max="-2" attributes="0"/>
97-
<Component id="additionalRenderStatePane" pref="329" max="32767" attributes="0"/>
98-
<EmptySpace pref="12" max="32767" attributes="0"/>
97+
<Component id="additionalRenderStatePane" pref="331" max="32767" attributes="0"/>
98+
<EmptySpace pref="16" max="32767" attributes="0"/>
9999
</Group>
100100
<Group type="102" alignment="0" attributes="0">
101101
<Group type="103" groupAlignment="0" attributes="0">
@@ -127,7 +127,7 @@
127127
</Group>
128128
<EmptySpace max="-2" attributes="0"/>
129129
<Group type="103" groupAlignment="0" attributes="0">
130-
<Component id="jTabbedPane3" alignment="1" max="32767" attributes="0"/>
130+
<Component id="optionsPane" alignment="1" max="32767" attributes="0"/>
131131
<Component id="texturesAndColorsPane" alignment="1" max="32767" attributes="0"/>
132132
<Component id="additionalRenderStatePane" alignment="0" max="32767" attributes="0"/>
133133
</Group>
@@ -180,11 +180,11 @@
180180
</Container>
181181
</SubComponents>
182182
</Container>
183-
<Container class="javax.swing.JTabbedPane" name="jTabbedPane3">
183+
<Container class="javax.swing.JTabbedPane" name="optionsPane">
184184
<Properties>
185185
<Property name="tabLayoutPolicy" type="int" value="1"/>
186186
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
187-
<Dimension value="[380, 355]"/>
187+
<Dimension value="[200, 355]"/>
188188
</Property>
189189
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
190190
<Dimension value="[500, 355]"/>

jme3-materialeditor/src/com/jme3/gde/materials/multiview/MaterialEditorTopComponent.java

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
import com.jme3.gde.materials.multiview.widgets.WidgetFactory;
1818
import com.jme3.material.Material;
1919
import java.awt.Component;
20+
import java.awt.GridLayout;
21+
import java.awt.event.ComponentEvent;
22+
import java.awt.event.ComponentListener;
2023
import java.io.File;
2124
import java.io.IOException;
2225
import java.util.ArrayList;
@@ -83,6 +86,28 @@ public MaterialEditorTopComponent(DataObject dataObject) {
8386

8487
private void initWindow() {
8588
initComponents();
89+
optionsPane.addComponentListener(new ComponentListener() {
90+
@Override
91+
public void componentResized(ComponentEvent e) {
92+
if(optionsPane.getWidth() > 400) {
93+
((GridLayout)optionsPanel.getLayout()).setColumns(2);
94+
} else {
95+
((GridLayout)optionsPanel.getLayout()).setColumns(1);
96+
}
97+
}
98+
99+
@Override
100+
public void componentMoved(ComponentEvent e) {
101+
}
102+
103+
@Override
104+
public void componentShown(ComponentEvent e) {
105+
}
106+
107+
@Override
108+
public void componentHidden(ComponentEvent e) {
109+
}
110+
});
86111
setName(NbBundle.getMessage(MaterialEditorTopComponent.class, "CTL_MaterialEditorTopComponent"));
87112
setToolTipText(NbBundle.getMessage(MaterialEditorTopComponent.class, "HINT_MaterialEditorTopComponent"));
88113
setActivatedNodes(new Node[]{dataObject.getNodeDelegate()});
@@ -119,7 +144,7 @@ private void initComponents() {
119144
texturesAndColorsPane = new javax.swing.JTabbedPane();
120145
jScrollPane3 = new javax.swing.JScrollPane();
121146
texturePanel = new javax.swing.JPanel();
122-
jTabbedPane3 = new javax.swing.JTabbedPane();
147+
optionsPane = new javax.swing.JTabbedPane();
123148
jScrollPane2 = new javax.swing.JScrollPane();
124149
optionsPanel = new javax.swing.JPanel();
125150
jToolBar2 = new javax.swing.JToolBar();
@@ -169,17 +194,17 @@ private void initComponents() {
169194

170195
texturesAndColorsPane.addTab(org.openide.util.NbBundle.getMessage(MaterialEditorTopComponent.class, "MaterialEditorTopComponent.jScrollPane3.TabConstraints.tabTitle"), jScrollPane3); // NOI18N
171196

172-
jTabbedPane3.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT);
173-
jTabbedPane3.setMinimumSize(new java.awt.Dimension(380, 355));
174-
jTabbedPane3.setPreferredSize(new java.awt.Dimension(500, 355));
197+
optionsPane.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT);
198+
optionsPane.setMinimumSize(new java.awt.Dimension(200, 355));
199+
optionsPane.setPreferredSize(new java.awt.Dimension(500, 355));
175200

176201
jScrollPane2.setBorder(null);
177202
jScrollPane2.setMinimumSize(new java.awt.Dimension(220, 0));
178203

179204
optionsPanel.setLayout(new java.awt.GridLayout(0, 2));
180205
jScrollPane2.setViewportView(optionsPanel);
181206

182-
jTabbedPane3.addTab(org.openide.util.NbBundle.getMessage(MaterialEditorTopComponent.class, "MaterialEditorTopComponent.jScrollPane2.TabConstraints.tabTitle_1"), jScrollPane2); // NOI18N
207+
optionsPane.addTab(org.openide.util.NbBundle.getMessage(MaterialEditorTopComponent.class, "MaterialEditorTopComponent.jScrollPane2.TabConstraints.tabTitle_1"), jScrollPane2); // NOI18N
183208

184209
jToolBar2.setRollover(true);
185210

@@ -274,14 +299,14 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
274299
.addGroup(editorPanelLayout.createSequentialGroup()
275300
.addGroup(editorPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
276301
.addComponent(materialPreviewWidget1, javax.swing.GroupLayout.PREFERRED_SIZE, 255, javax.swing.GroupLayout.PREFERRED_SIZE)
277-
.addComponent(jTabbedPane3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
302+
.addComponent(optionsPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
278303
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
279304
.addGroup(editorPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
280305
.addGroup(editorPanelLayout.createSequentialGroup()
281-
.addComponent(texturesAndColorsPane, javax.swing.GroupLayout.DEFAULT_SIZE, 496, Short.MAX_VALUE)
306+
.addComponent(texturesAndColorsPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
282307
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
283-
.addComponent(additionalRenderStatePane, javax.swing.GroupLayout.DEFAULT_SIZE, 329, Short.MAX_VALUE)
284-
.addContainerGap(12, Short.MAX_VALUE))
308+
.addComponent(additionalRenderStatePane, javax.swing.GroupLayout.DEFAULT_SIZE, 331, Short.MAX_VALUE)
309+
.addContainerGap(16, Short.MAX_VALUE))
285310
.addGroup(editorPanelLayout.createSequentialGroup()
286311
.addGroup(editorPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
287312
.addComponent(jToolBar3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
@@ -304,7 +329,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
304329
.addComponent(materialPreviewWidget1, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE))
305330
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
306331
.addGroup(editorPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
307-
.addComponent(jTabbedPane3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
332+
.addComponent(optionsPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
308333
.addComponent(texturesAndColorsPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
309334
.addComponent(additionalRenderStatePane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
310335
);
@@ -368,12 +393,12 @@ private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI
368393
private javax.swing.JScrollPane jScrollPane3;
369394
private javax.swing.JScrollPane jScrollPane4;
370395
private javax.swing.JTabbedPane jTabbedPane1;
371-
private javax.swing.JTabbedPane jTabbedPane3;
372396
private javax.swing.JTextArea jTextArea1;
373397
private javax.swing.JTextField jTextField1;
374398
private javax.swing.JToolBar jToolBar2;
375399
private javax.swing.JToolBar jToolBar3;
376400
private com.jme3.gde.materials.multiview.widgets.MaterialPreviewWidget materialPreviewWidget1;
401+
private javax.swing.JTabbedPane optionsPane;
377402
private javax.swing.JPanel optionsPanel;
378403
private javax.swing.JPanel statesPanel;
379404
private javax.swing.JPanel texturePanel;

jme3-materialeditor/src/com/jme3/gde/shadernodedefinition/wizard/SNDefVisualPanel2.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public final class SNDefVisualPanel2 extends JPanel {
4646
private final Object[] emptyObj = {"float", "", ""};
4747
private final String type;
4848
private final String[] varTypes = new String[]{"bool", "int", "float", "vec2",
49-
"vec3", "vec4", "sampler", "sampler2D", "sampler3D", "mat3", "mat4"};
49+
"vec3", "vec4", "sampler", "sampler2D", "sampler3D", "mat3", "mat4",
50+
"samplerCube", "sampler2DArray"};
5051

5152
/**
5253
* Creates new form SNDefVisualPanel2
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/*
2+
* Copyright (c) 2009-2023 jMonkeyEngine
3+
* All rights reserved.
4+
*
5+
* Redistribution and use in source and binary forms, with or without
6+
* modification, are permitted provided that the following conditions are
7+
* met:
8+
*
9+
* * Redistributions of source code must retain the above copyright
10+
* notice, this list of conditions and the following disclaimer.
11+
*
12+
* * Redistributions in binary form must reproduce the above copyright
13+
* notice, this list of conditions and the following disclaimer in the
14+
* documentation and/or other materials provided with the distribution.
15+
*
16+
* * Neither the name of 'jMonkeyEngine' nor the names of its contributors
17+
* may be used to endorse or promote products derived from this software
18+
* without specific prior written permission.
19+
*
20+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22+
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23+
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24+
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26+
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27+
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28+
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31+
*/
32+
package com.jme3.gde.materials.multiview.widgets;
33+
34+
import static org.junit.jupiter.api.Assertions.assertEquals;
35+
import org.junit.jupiter.api.Test;
36+
37+
38+
/**
39+
*
40+
* @author rickard
41+
*/
42+
public class TexturePanelTest {
43+
44+
public TexturePanelTest() {
45+
}
46+
47+
@Test
48+
public void testExtractTextureName() {
49+
TexturePanel texturePanel = new TexturePanel();
50+
String textureName = "\"simple_name.jpg\"";
51+
String extractedName = texturePanel.extractTextureName(textureName);
52+
assertEquals("simple_name.jpg", extractedName);
53+
54+
String textureNameWithModifier = "Flip Repeat \"simple_name.jpg\"";
55+
extractedName = texturePanel.extractTextureName(textureNameWithModifier);
56+
assertEquals("simple_name.jpg", extractedName);
57+
58+
String textureNameWithSpaces = "\"texture name with spaces.jpg\"";
59+
extractedName = texturePanel.extractTextureName(textureNameWithSpaces);
60+
assertEquals("texture name with spaces.jpg", extractedName);
61+
62+
String textureNameWithSpaceAndModifier = "Flip Repeat \"texture name with spaces.jpg\"";
63+
extractedName = texturePanel.extractTextureName(textureNameWithSpaceAndModifier);
64+
assertEquals("texture name with spaces.jpg", extractedName);
65+
}
66+
67+
}
Binary file not shown.

jme3-templates/src/com/jme3/gde/templates/files/freemarker/build.gradle.ftl

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@ plugins {
77
group 'com.mygame'
88
version '1.0'
99

10-
mainClassName = "com.mygame.Main"
10+
application {
11+
applicationName = '${name}'
12+
mainClass = 'com.mygame.Main'
13+
// Mac OS with LWJGL 3 needs to be started with this JVM argument
14+
if (System.getProperty("os.name").toLowerCase().contains("mac")) {
15+
applicationDefaultJvmArgs = ['-XstartOnFirstThread']
16+
}
17+
}
1118

1219
repositories {
1320
mavenCentral()
14-
jcenter()
1521
maven { url 'https://jitpack.io' }
1622
}
1723

@@ -45,7 +51,10 @@ dependencies {
4551
implementation "org.jmonkeyengine:jme3-core:$jmeVer"
4652
implementation "org.jmonkeyengine:jme3-desktop:$jmeVer"
4753
<#if jmeVersion.versionInfo.major gt 3 || (jmeVersion.versionInfo.major == 3 && jmeVersion.versionInfo.minor gte 6 )>
48-
implementation "org.jmonkeyengine:jme3-awt-dialogs:$jmeVer"
54+
// Mac OS with LWJGL 3 doesn't allow AWT/Swing
55+
if (!System.getProperty("os.name").toLowerCase().contains("mac")) {
56+
implementation "org.jmonkeyengine:jme3-awt-dialogs:$jmeVer"
57+
}
4958
</#if>
5059
<#if lwjglLibrary.isCoreJmeLibrary == true>
5160
implementation "${lwjglLibrary.groupId}:${lwjglLibrary.artifactId}:$jmeVer"
@@ -99,7 +108,7 @@ dependencies {
99108

100109
jar {
101110
manifest {
102-
attributes 'Main-Class': "$mainClassName"
111+
attributes 'Main-Class': application.mainClass
103112
}
104113
}
105114

@@ -110,5 +119,5 @@ java {
110119
}
111120

112121
wrapper {
113-
gradleVersion = '7.6'
122+
gradleVersion = '8.4'
114123
}

jme3-templates/src/com/jme3/gde/templates/gradledesktop/GradleDesktopGameWizardIterator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ private String[] createSteps() {
132132
// Create build.gradle from template
133133
File gradleBuildFile = new File(dirF, "build.gradle");
134134
Map<String, Object> buildFileBindings = new HashMap<>();
135+
buildFileBindings.put("name", wiz.getProperty("name"));
135136
buildFileBindings.put("jmeVersion", wiz.getProperty("jmeVersion"));
136137
buildFileBindings.put("lwjglLibrary", wiz.getProperty("lwjglLibrary"));
137138
buildFileBindings.put("guiLibrary", wiz.getProperty("guiLibrary"));

jme3-templates/src/com/jme3/gde/templates/gradledesktop/options/AdditionalLibrary.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public enum AdditionalLibrary implements TemplateLibrary {
9999
SHADERBLOW_EX("ShaderBlowEx", NbBundle.getMessage(AdditionalLibrary.class,
100100
"additionalLibrary.shaderblowex.description"),
101101
"com.github.polincdev", "ShaderBlowEx",
102-
"master-SNAPSHOT", false),
102+
"-SNAPSHOT", false),
103103
SIO2("SiO2", NbBundle.getMessage(AdditionalLibrary.class,
104104
"additionalLibrary.sio2.description"),
105105
"com.simsilica", "sio2",

0 commit comments

Comments
 (0)