.. | .. |
---|
928 | 928 | |
---|
929 | 929 | JTabbedPane resourcecontainer; |
---|
930 | 930 | cGridBag currenttab; |
---|
931 | | - boolean added; // patch for jar |
---|
| 931 | + //boolean added; // patch for jar |
---|
932 | 932 | |
---|
933 | 933 | int tabcount = 0; |
---|
934 | 934 | int colcount = 0; |
---|
.. | .. |
---|
940 | 940 | |
---|
941 | 941 | public void ResourceCallBack(String[] path) |
---|
942 | 942 | { |
---|
943 | | - for (int i = 0; i < path.length; i++) |
---|
944 | | - System.out.print(path[i] + "/"); |
---|
945 | | - System.out.println(); |
---|
| 943 | +// for (int i = 0; i < path.length; i++) |
---|
| 944 | +// System.out.print(path[i] + "/"); |
---|
| 945 | +// System.out.println(); |
---|
946 | 946 | |
---|
947 | 947 | if (//rowcount == 0 || |
---|
948 | | - path.length == 1) |
---|
| 948 | + path.length == 1 && !path[0].equals("") && !path[0].equals(".DS_Store")) |
---|
949 | 949 | { |
---|
950 | 950 | currenttab = new cGridBag(); |
---|
951 | | - added = false; |
---|
952 | 951 | String tabname = path[0]; // String.valueOf((char)('A'+tabcount)); |
---|
953 | 952 | currenttab.setName(tabname); |
---|
| 953 | + //added = false; |
---|
| 954 | + resourcecontainer.add(currenttab); |
---|
| 955 | + resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname); |
---|
954 | 956 | rowcount = 1; |
---|
955 | 957 | colcount = 0; |
---|
956 | 958 | texturecount = 0; |
---|
.. | .. |
---|
958 | 960 | |
---|
959 | 961 | if (path.length > 2 && path[2].toLowerCase().endsWith(".jpg")) |
---|
960 | 962 | { |
---|
961 | | - if (!added) |
---|
| 963 | + //if (!added) |
---|
962 | 964 | { |
---|
963 | | - added = true; |
---|
964 | | - resourcecontainer.add(currenttab); |
---|
| 965 | + //added = true; |
---|
965 | 966 | String tabname = path[0]; // String.valueOf((char)('A'+tabcount)); |
---|
966 | | - resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname); |
---|
| 967 | + currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname)); |
---|
967 | 968 | } |
---|
968 | 969 | |
---|
969 | 970 | AddTextureButton(path[0], path[1], path[2], texturecount++, currenttab); |
---|
.. | .. |
---|
1186 | 1187 | boxButton.setToolTipText("Create box"); |
---|
1187 | 1188 | boxButton.addActionListener(this); |
---|
1188 | 1189 | |
---|
| 1190 | + row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1191 | + superButton.setToolTipText("Create superellipsoid"); |
---|
| 1192 | + superButton.addActionListener(this); |
---|
| 1193 | + |
---|
1189 | 1194 | row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1190 | 1195 | sphereButton.setToolTipText("Create sphere"); |
---|
1191 | 1196 | sphereButton.addActionListener(this); |
---|
.. | .. |
---|
1197 | 1202 | row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1198 | 1203 | torusButton.setToolTipText("Create torus"); |
---|
1199 | 1204 | torusButton.addActionListener(this); |
---|
1200 | | - |
---|
1201 | | - row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1202 | | - superButton.setToolTipText("Create superellipsoid"); |
---|
1203 | | - superButton.addActionListener(this); |
---|
1204 | 1205 | |
---|
1205 | 1206 | if (Globals.ADVANCED) |
---|
1206 | 1207 | { |
---|
.. | .. |
---|
2164 | 2165 | shadow.material = new cMaterial(obj.material); |
---|
2165 | 2166 | shadow.material.diffuse = 0.0001f; |
---|
2166 | 2167 | shadow.material.specular = 0.0001f; |
---|
2167 | | - //shadow.projectedVertices[1].x = 300; |
---|
| 2168 | + shadow.material.opacity = 0.75f; |
---|
| 2169 | + |
---|
| 2170 | + AllocProjectedVertices(shadow); |
---|
| 2171 | + |
---|
| 2172 | + shadow.projectedVertices[1].x = 300; |
---|
2168 | 2173 | |
---|
2169 | 2174 | makeSomething(shadow); |
---|
2170 | 2175 | } |
---|