.. | .. |
---|
83 | 83 | cButton GetButton(String name, boolean border) |
---|
84 | 84 | { |
---|
85 | 85 | ImageIcon icon = GetIcon(name); |
---|
86 | | - if (icon != null) |
---|
| 86 | + if (icon != null || name.contains("/")) |
---|
87 | 87 | return new cButton(icon, border); |
---|
88 | 88 | else |
---|
89 | 89 | return new cButton(name, border); |
---|
.. | .. |
---|
1318 | 1318 | |
---|
1319 | 1319 | //if (copy.pinned) |
---|
1320 | 1320 | { |
---|
1321 | | - pinButton = GetToggleButton("icons/pin.png", !Grafreed.NIMBUSLAF); |
---|
| 1321 | + pinButton = GetToggleButton("icons/pin.png", !Globals.NIMBUSLAF); |
---|
1322 | 1322 | pinButton.setSelected(copy.pinned); |
---|
1323 | 1323 | cGridBag t = new cGridBag(); |
---|
1324 | 1324 | t.preferredWidth = 2; |
---|
.. | .. |
---|
1638 | 1638 | |
---|
1639 | 1639 | resetTransformPanel.preferredHeight = 2; |
---|
1640 | 1640 | |
---|
1641 | | - cButton resetTransform = GetButton("Reset all", !Grafreed.NIMBUSLAF); |
---|
| 1641 | + cButton resetTransform = GetButton("Reset all", !Globals.NIMBUSLAF); |
---|
| 1642 | + resetTransform.setToolTipText("Reset Translation, Rotation and Scale"); |
---|
1642 | 1643 | resetTransform.addMouseListener(new MouseAdapter() |
---|
1643 | 1644 | { |
---|
1644 | 1645 | public void mouseClicked(MouseEvent e) |
---|
.. | .. |
---|
1648 | 1649 | }); |
---|
1649 | 1650 | resetTransformPanel.add(resetTransform); |
---|
1650 | 1651 | |
---|
1651 | | - resetTransform = GetButton("T only", !Grafreed.NIMBUSLAF); |
---|
| 1652 | + resetTransform = GetButton("T only", !Globals.NIMBUSLAF); |
---|
| 1653 | + resetTransform.setToolTipText("Reset Translation only"); |
---|
1652 | 1654 | resetTransform.addMouseListener(new MouseAdapter() |
---|
1653 | 1655 | { |
---|
1654 | 1656 | public void mouseClicked(MouseEvent e) |
---|
.. | .. |
---|
1658 | 1660 | }); |
---|
1659 | 1661 | resetTransformPanel.add(resetTransform); |
---|
1660 | 1662 | |
---|
1661 | | - resetTransform = GetButton("RS only", !Grafreed.NIMBUSLAF); |
---|
| 1663 | + resetTransform = GetButton("RS only", !Globals.NIMBUSLAF); |
---|
| 1664 | + resetTransform.setToolTipText("Reset Rotation and Scale only"); |
---|
1662 | 1665 | resetTransform.addMouseListener(new MouseAdapter() |
---|
1663 | 1666 | { |
---|
1664 | 1667 | public void mouseClicked(MouseEvent e) |
---|
.. | .. |
---|
1773 | 1776 | |
---|
1774 | 1777 | AddOptions(optionsPanel); //, aConstraints); |
---|
1775 | 1778 | |
---|
1776 | | - tabbedPane.add(optionsPanel); |
---|
1777 | | - |
---|
1778 | 1779 | tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1779 | 1780 | |
---|
| 1781 | + tabbedPane.add(optionsPanel); |
---|
| 1782 | + |
---|
1780 | 1783 | scenePanel.add(tabbedPane); |
---|
1781 | 1784 | |
---|
1782 | | - //if (Globals.ADVANCED) |
---|
1783 | | -// tabbedPane.add(infoPanel); |
---|
1784 | | -// tabbedPane.setIconAt(3, GetIcon("icons/info.png")); |
---|
1785 | | -// tabbedPane.setToolTipTextAt(3, "Information"); |
---|
| 1785 | + cGridBag creditsPanel = new cGridBag().setVertical(true); |
---|
| 1786 | + creditsPanel.setName("Credits"); |
---|
1786 | 1787 | |
---|
| 1788 | + cLabel ogaLabel = new cLabel(" Most Skyboxes courtesy of OpenGameArt!", !Globals.NIMBUSLAF); |
---|
| 1789 | + creditsPanel.add(ogaLabel); |
---|
| 1790 | + |
---|
| 1791 | + cButton opengameartButton; |
---|
| 1792 | + creditsPanel.add(opengameartButton = GetButton("icons/sara-logo.png", !Globals.NIMBUSLAF)); |
---|
| 1793 | + opengameartButton.setToolTipText("https://opengameart.org"); |
---|
| 1794 | + |
---|
| 1795 | + opengameartButton.addMouseListener(new MouseAdapter() |
---|
| 1796 | + { |
---|
| 1797 | + public void mouseClicked(MouseEvent e) |
---|
| 1798 | + { |
---|
| 1799 | + try |
---|
| 1800 | + { |
---|
| 1801 | + Desktop.getDesktop().browse(new java.net.URI("https://opengameart.org/")); |
---|
| 1802 | + } catch (Exception e1) |
---|
| 1803 | +// } catch (java.io.IOException | java.net.URISyntaxException e1) |
---|
| 1804 | + { |
---|
| 1805 | + e1.printStackTrace(); |
---|
| 1806 | + } |
---|
| 1807 | + } |
---|
| 1808 | + }); |
---|
| 1809 | + |
---|
| 1810 | + for (int i=10; --i>=0;) |
---|
| 1811 | + { |
---|
| 1812 | + creditsPanel.add(new cGridBag()); |
---|
| 1813 | + } |
---|
| 1814 | + |
---|
| 1815 | + tabbedPane.add(creditsPanel); |
---|
| 1816 | + tabbedPane.setToolTipTextAt(3, "Credits"); |
---|
| 1817 | + |
---|
| 1818 | + if (Globals.ADVANCED) |
---|
| 1819 | + { |
---|
| 1820 | + tabbedPane.add(infoPanel); |
---|
| 1821 | + tabbedPane.setIconAt(4, GetIcon("icons/info.png")); |
---|
| 1822 | + tabbedPane.setToolTipTextAt(4, "Information"); |
---|
| 1823 | + } |
---|
| 1824 | + |
---|
1787 | 1825 | /* |
---|
1788 | 1826 | cTree jTree = new cTree(null); |
---|
1789 | 1827 | ToolTipManager.sharedInstance().registerComponent(jTree); |
---|
.. | .. |
---|
1929 | 1967 | { |
---|
1930 | 1968 | cGridBag presetpanel = new cGridBag().setVertical(true); |
---|
1931 | 1969 | |
---|
1932 | | - cLabel skin = GetLabel("icons/shadericons/shadericon00000.png", !Grafreed.NIMBUSLAF); |
---|
| 1970 | + cLabel skin = GetLabel("icons/shadericons/shadericon00000.png", !Globals.NIMBUSLAF); |
---|
1933 | 1971 | skin.setToolTipText("Skin"); |
---|
1934 | 1972 | skin.addMouseListener(new MouseAdapter() |
---|
1935 | 1973 | { |
---|
.. | .. |
---|
1967 | 2005 | }); |
---|
1968 | 2006 | presetpanel.add(skin); |
---|
1969 | 2007 | |
---|
1970 | | - cLabel lambert = GetLabel("icons/shadericons/shadericon00002.png", !Grafreed.NIMBUSLAF); |
---|
| 2008 | + cLabel lambert = GetLabel("icons/shadericons/shadericon00002.png", !Globals.NIMBUSLAF); |
---|
1971 | 2009 | lambert.setToolTipText("Diffuse"); |
---|
1972 | 2010 | lambert.addMouseListener(new MouseAdapter() |
---|
1973 | 2011 | { |
---|
.. | .. |
---|
1985 | 2023 | }); |
---|
1986 | 2024 | presetpanel.add(lambert); |
---|
1987 | 2025 | |
---|
1988 | | - cLabel diffuse2 = GetLabel("icons/shadericons/shadericon00003.png", !Grafreed.NIMBUSLAF); |
---|
| 2026 | + cLabel diffuse2 = GetLabel("icons/shadericons/shadericon00003.png", !Globals.NIMBUSLAF); |
---|
1989 | 2027 | diffuse2.setToolTipText("Diffuse2"); |
---|
1990 | 2028 | diffuse2.addMouseListener(new MouseAdapter() |
---|
1991 | 2029 | { |
---|
.. | .. |
---|
2003 | 2041 | }); |
---|
2004 | 2042 | presetpanel.add(diffuse2); |
---|
2005 | 2043 | |
---|
2006 | | - cLabel diffusemoon = GetLabel("icons/shadericons/shadericon00004.png", !Grafreed.NIMBUSLAF); |
---|
| 2044 | + cLabel diffusemoon = GetLabel("icons/shadericons/shadericon00004.png", !Globals.NIMBUSLAF); |
---|
2007 | 2045 | diffusemoon.setToolTipText("Moon"); |
---|
2008 | 2046 | diffusemoon.addMouseListener(new MouseAdapter() |
---|
2009 | 2047 | { |
---|
.. | .. |
---|
2021 | 2059 | }); |
---|
2022 | 2060 | presetpanel.add(diffusemoon); |
---|
2023 | 2061 | |
---|
2024 | | - cLabel diffusemoon2 = GetLabel("icons/shadericons/shadericon00005.png", !Grafreed.NIMBUSLAF); |
---|
| 2062 | + cLabel diffusemoon2 = GetLabel("icons/shadericons/shadericon00005.png", !Globals.NIMBUSLAF); |
---|
2025 | 2063 | diffusemoon2.setToolTipText("Moon2"); |
---|
2026 | 2064 | diffusemoon2.addMouseListener(new MouseAdapter() |
---|
2027 | 2065 | { |
---|
.. | .. |
---|
2039 | 2077 | }); |
---|
2040 | 2078 | presetpanel.add(diffusemoon2); |
---|
2041 | 2079 | |
---|
2042 | | - cLabel diffusemoon3 = GetLabel("icons/shadericons/shadericon00006.png", !Grafreed.NIMBUSLAF); |
---|
| 2080 | + cLabel diffusemoon3 = GetLabel("icons/shadericons/shadericon00006.png", !Globals.NIMBUSLAF); |
---|
2043 | 2081 | diffusemoon3.setToolTipText("Moon3"); |
---|
2044 | 2082 | diffusemoon3.addMouseListener(new MouseAdapter() |
---|
2045 | 2083 | { |
---|
.. | .. |
---|
2057 | 2095 | }); |
---|
2058 | 2096 | presetpanel.add(diffusemoon3); |
---|
2059 | 2097 | |
---|
2060 | | - cLabel diffusesheen = GetLabel("icons/shadericons/shadericon00007.png", !Grafreed.NIMBUSLAF); |
---|
| 2098 | + cLabel diffusesheen = GetLabel("icons/shadericons/shadericon00007.png", !Globals.NIMBUSLAF); |
---|
2061 | 2099 | diffusesheen.setToolTipText("Sheen"); |
---|
2062 | 2100 | diffusesheen.addMouseListener(new MouseAdapter() |
---|
2063 | 2101 | { |
---|
.. | .. |
---|
2074 | 2112 | }); |
---|
2075 | 2113 | presetpanel.add(diffusesheen); |
---|
2076 | 2114 | |
---|
2077 | | - cLabel rough = GetLabel("icons/shadericons/shadericon00001.png", !Grafreed.NIMBUSLAF); |
---|
| 2115 | + cLabel rough = GetLabel("icons/shadericons/shadericon00001.png", !Globals.NIMBUSLAF); |
---|
2078 | 2116 | rough.setToolTipText("Rough metal"); |
---|
2079 | 2117 | rough.addMouseListener(new MouseAdapter() |
---|
2080 | 2118 | { |
---|
.. | .. |
---|
2092 | 2130 | }); |
---|
2093 | 2131 | presetpanel.add(rough); |
---|
2094 | 2132 | |
---|
2095 | | - cLabel rough2 = GetLabel("icons/shadericons/shadericon00013.png", !Grafreed.NIMBUSLAF); |
---|
| 2133 | + cLabel rough2 = GetLabel("icons/shadericons/shadericon00013.png", !Globals.NIMBUSLAF); |
---|
2096 | 2134 | rough2.setToolTipText("Medium metal"); |
---|
2097 | 2135 | rough2.addMouseListener(new MouseAdapter() |
---|
2098 | 2136 | { |
---|
.. | .. |
---|
2110 | 2148 | }); |
---|
2111 | 2149 | presetpanel.add(rough2); |
---|
2112 | 2150 | |
---|
2113 | | - cLabel shini0 = GetLabel("icons/shadericons/shadericon00014.png", !Grafreed.NIMBUSLAF); |
---|
| 2151 | + cLabel shini0 = GetLabel("icons/shadericons/shadericon00014.png", !Globals.NIMBUSLAF); |
---|
2114 | 2152 | shini0.setToolTipText("Shiny"); |
---|
2115 | 2153 | shini0.addMouseListener(new MouseAdapter() |
---|
2116 | 2154 | { |
---|
.. | .. |
---|
2128 | 2166 | }); |
---|
2129 | 2167 | presetpanel.add(shini0); |
---|
2130 | 2168 | |
---|
2131 | | - cLabel shini1 = GetLabel("icons/shadericons/shadericon00011.png", !Grafreed.NIMBUSLAF); |
---|
| 2169 | + cLabel shini1 = GetLabel("icons/shadericons/shadericon00011.png", !Globals.NIMBUSLAF); |
---|
2132 | 2170 | shini1.setToolTipText("Shiny2"); |
---|
2133 | 2171 | shini1.addMouseListener(new MouseAdapter() |
---|
2134 | 2172 | { |
---|
.. | .. |
---|
2146 | 2184 | }); |
---|
2147 | 2185 | presetpanel.add(shini1); |
---|
2148 | 2186 | |
---|
2149 | | - cLabel shini2 = GetLabel("icons/shadericons/shadericon00012.png", !Grafreed.NIMBUSLAF); |
---|
| 2187 | + cLabel shini2 = GetLabel("icons/shadericons/shadericon00012.png", !Globals.NIMBUSLAF); |
---|
2150 | 2188 | shini2.setToolTipText("Shiny3"); |
---|
2151 | 2189 | shini2.addMouseListener(new MouseAdapter() |
---|
2152 | 2190 | { |
---|
.. | .. |
---|
2164 | 2202 | }); |
---|
2165 | 2203 | presetpanel.add(shini2); |
---|
2166 | 2204 | |
---|
2167 | | - cLabel aniso = GetLabel("icons/shadericons/shadericon00008.png", !Grafreed.NIMBUSLAF); |
---|
| 2205 | + cLabel aniso = GetLabel("icons/shadericons/shadericon00008.png", !Globals.NIMBUSLAF); |
---|
2168 | 2206 | aniso.setToolTipText("AnisoU"); |
---|
2169 | 2207 | aniso.addMouseListener(new MouseAdapter() |
---|
2170 | 2208 | { |
---|
.. | .. |
---|
2182 | 2220 | }); |
---|
2183 | 2221 | presetpanel.add(aniso); |
---|
2184 | 2222 | |
---|
2185 | | - cLabel aniso2 = GetLabel("icons/shadericons/shadericon00009.png", !Grafreed.NIMBUSLAF); |
---|
| 2223 | + cLabel aniso2 = GetLabel("icons/shadericons/shadericon00009.png", !Globals.NIMBUSLAF); |
---|
2186 | 2224 | aniso2.setToolTipText("AnisoV"); |
---|
2187 | 2225 | aniso2.addMouseListener(new MouseAdapter() |
---|
2188 | 2226 | { |
---|
.. | .. |
---|
2200 | 2238 | }); |
---|
2201 | 2239 | presetpanel.add(aniso2); |
---|
2202 | 2240 | |
---|
2203 | | - cLabel aniso3 = GetLabel("icons/shadericons/shadericon00010.png", !Grafreed.NIMBUSLAF); |
---|
| 2241 | + cLabel aniso3 = GetLabel("icons/shadericons/shadericon00010.png", !Globals.NIMBUSLAF); |
---|
2204 | 2242 | aniso3.setToolTipText("AnisoUV"); |
---|
2205 | 2243 | aniso3.addMouseListener(new MouseAdapter() |
---|
2206 | 2244 | { |
---|
.. | .. |
---|
2218 | 2256 | }); |
---|
2219 | 2257 | presetpanel.add(aniso3); |
---|
2220 | 2258 | |
---|
2221 | | - cLabel velvet0 = GetLabel("icons/shadericons/shadericon00015.png", !Grafreed.NIMBUSLAF); |
---|
| 2259 | + cLabel velvet0 = GetLabel("icons/shadericons/shadericon00015.png", !Globals.NIMBUSLAF); |
---|
2222 | 2260 | velvet0.setToolTipText("Velvet"); |
---|
2223 | 2261 | velvet0.addMouseListener(new MouseAdapter() |
---|
2224 | 2262 | { |
---|
.. | .. |
---|
2240 | 2278 | }); |
---|
2241 | 2279 | presetpanel.add(velvet0); |
---|
2242 | 2280 | |
---|
2243 | | - cLabel bump0 = GetLabel("icons/shadericons/shadericon00016.png", !Grafreed.NIMBUSLAF); |
---|
| 2281 | + cLabel bump0 = GetLabel("icons/shadericons/shadericon00016.png", !Globals.NIMBUSLAF); |
---|
2244 | 2282 | bump0.setToolTipText("Bump texture"); |
---|
2245 | 2283 | bump0.addMouseListener(new MouseAdapter() |
---|
2246 | 2284 | { |
---|
.. | .. |
---|
2259 | 2297 | }); |
---|
2260 | 2298 | presetpanel.add(bump0); |
---|
2261 | 2299 | |
---|
2262 | | - cLabel borderShader = GetLabel("icons/shadericons/borderfade.jpg", !Grafreed.NIMBUSLAF); |
---|
| 2300 | + cLabel borderShader = GetLabel("icons/shadericons/borderfade.jpg", !Globals.NIMBUSLAF); |
---|
2263 | 2301 | borderShader.setToolTipText("Border fade"); |
---|
2264 | 2302 | borderShader.addMouseListener(new MouseAdapter() |
---|
2265 | 2303 | { |
---|
.. | .. |
---|
2274 | 2312 | }); |
---|
2275 | 2313 | presetpanel.add(borderShader); |
---|
2276 | 2314 | |
---|
2277 | | - cLabel halo = GetLabel("icons/shadericons/shadericon00017.png", !Grafreed.NIMBUSLAF); |
---|
| 2315 | + cLabel halo = GetLabel("icons/shadericons/shadericon00017.png", !Globals.NIMBUSLAF); |
---|
2278 | 2316 | halo.setToolTipText("Halo"); |
---|
2279 | 2317 | halo.addMouseListener(new MouseAdapter() |
---|
2280 | 2318 | { |
---|
.. | .. |
---|
2291 | 2329 | }); |
---|
2292 | 2330 | presetpanel.add(halo); |
---|
2293 | 2331 | |
---|
2294 | | - cLabel candle = GetLabel("icons/shadericons/shadericon00018.png", !Grafreed.NIMBUSLAF); |
---|
| 2332 | + cLabel candle = GetLabel("icons/shadericons/shadericon00018.png", !Globals.NIMBUSLAF); |
---|
2295 | 2333 | candle.setToolTipText("Candle"); |
---|
2296 | 2334 | candle.addMouseListener(new MouseAdapter() |
---|
2297 | 2335 | { |
---|
.. | .. |
---|
2313 | 2351 | }); |
---|
2314 | 2352 | presetpanel.add(candle); |
---|
2315 | 2353 | |
---|
2316 | | - cLabel shadowShader = GetLabel("icons/shadericons/shadow.png", !Grafreed.NIMBUSLAF); |
---|
| 2354 | + cLabel shadowShader = GetLabel("icons/shadericons/shadow.png", !Globals.NIMBUSLAF); |
---|
2317 | 2355 | shadowShader.setToolTipText("Shadow"); |
---|
2318 | 2356 | shadowShader.addMouseListener(new MouseAdapter() |
---|
2319 | 2357 | { |
---|
.. | .. |
---|
2348 | 2386 | |
---|
2349 | 2387 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
2350 | 2388 | |
---|
2351 | | - editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 2389 | + editBar.add(createMaterialButton = new cButton("Create", !Globals.NIMBUSLAF)); // , aConstraints); |
---|
2352 | 2390 | createMaterialButton.setToolTipText("Create material"); |
---|
2353 | 2391 | |
---|
2354 | 2392 | /* |
---|
2355 | 2393 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
2356 | 2394 | */ |
---|
2357 | 2395 | |
---|
2358 | | - editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 2396 | + editBar.add(clearMaterialButton = new cButton("Clear", !Globals.NIMBUSLAF)); // , aConstraints); |
---|
2359 | 2397 | clearMaterialButton.setToolTipText("Clear material"); |
---|
2360 | 2398 | |
---|
2361 | 2399 | if (Globals.ADVANCED) |
---|
2362 | 2400 | { |
---|
2363 | | - editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 2401 | + editBar.add(resetSlidersButton = new cButton("Reset", !Globals.NIMBUSLAF)); // , aConstraints); |
---|
2364 | 2402 | editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
2365 | 2403 | editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
2366 | 2404 | } |
---|
.. | .. |
---|
4161 | 4199 | |
---|
4162 | 4200 | void New() |
---|
4163 | 4201 | { |
---|
4164 | | - while (copy.Size() > 1) |
---|
| 4202 | + while (copy.Size() > 0) |
---|
4165 | 4203 | { |
---|
4166 | | - copy.remove(1); |
---|
| 4204 | + copy.remove(0); |
---|
4167 | 4205 | } |
---|
4168 | 4206 | |
---|
| 4207 | + copy.selection.clear(); |
---|
| 4208 | + |
---|
4169 | 4209 | ResetModel(); |
---|
| 4210 | + SetupViews(); |
---|
4170 | 4211 | objEditor.refreshContents(); |
---|
4171 | 4212 | } |
---|
4172 | 4213 | |
---|