From 33504fc9a180903aace77613264550754fba5706 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Thu, 15 Aug 2019 12:03:58 -0400 Subject: [PATCH] Shadow RGB --- GroupEditor.java | 35 ++++++++++++++++++++--------------- 1 files changed, 20 insertions(+), 15 deletions(-) diff --git a/GroupEditor.java b/GroupEditor.java index b32dee9..03991c3 100644 --- a/GroupEditor.java +++ b/GroupEditor.java @@ -928,7 +928,7 @@ JTabbedPane resourcecontainer; cGridBag currenttab; - boolean added; // patch for jar + //boolean added; // patch for jar int tabcount = 0; int colcount = 0; @@ -940,17 +940,19 @@ public void ResourceCallBack(String[] path) { - for (int i = 0; i < path.length; i++) - System.out.print(path[i] + "/"); - System.out.println(); +// for (int i = 0; i < path.length; i++) +// System.out.print(path[i] + "/"); +// System.out.println(); if (//rowcount == 0 || - path.length == 1) + path.length == 1 && !path[0].equals("") && !path[0].equals(".DS_Store")) { currenttab = new cGridBag(); - added = false; String tabname = path[0]; // String.valueOf((char)('A'+tabcount)); currenttab.setName(tabname); + //added = false; + resourcecontainer.add(currenttab); + resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname); rowcount = 1; colcount = 0; texturecount = 0; @@ -958,12 +960,11 @@ if (path.length > 2 && path[2].toLowerCase().endsWith(".jpg")) { - if (!added) + //if (!added) { - added = true; - resourcecontainer.add(currenttab); + //added = true; String tabname = path[0]; // String.valueOf((char)('A'+tabcount)); - resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname); + currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname)); } AddTextureButton(path[0], path[1], path[2], texturecount++, currenttab); @@ -1186,6 +1187,10 @@ boxButton.setToolTipText("Create box"); boxButton.addActionListener(this); + row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); + superButton.setToolTipText("Create superellipsoid"); + superButton.addActionListener(this); + row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); sphereButton.setToolTipText("Create sphere"); sphereButton.addActionListener(this); @@ -1197,10 +1202,6 @@ row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); torusButton.setToolTipText("Create torus"); torusButton.addActionListener(this); - - row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); - superButton.setToolTipText("Create superellipsoid"); - superButton.addActionListener(this); if (Globals.ADVANCED) { @@ -2164,7 +2165,11 @@ shadow.material = new cMaterial(obj.material); shadow.material.diffuse = 0.0001f; shadow.material.specular = 0.0001f; - //shadow.projectedVertices[1].x = 300; + shadow.material.opacity = 0.75f; + + AllocProjectedVertices(shadow); + + shadow.projectedVertices[1].x = 300; makeSomething(shadow); } -- Gitblit v1.6.2