.. | .. |
---|
72 | 72 | } |
---|
73 | 73 | } |
---|
74 | 74 | |
---|
| 75 | + public Composite CreateCameras() |
---|
| 76 | + { |
---|
| 77 | + Composite cams = new cTemplate(); |
---|
| 78 | + cams.name = "Cameras"; |
---|
| 79 | + copy.insertElementAt(cams, 0); |
---|
| 80 | + |
---|
| 81 | + cams.addChild(new Camera()); |
---|
| 82 | + cams.addChild(new Camera(1)); |
---|
| 83 | + cams.addChild(new Camera(2)); |
---|
| 84 | + cams.addChild(new Camera(3)); |
---|
| 85 | + cams.addChild(new Camera(4)); |
---|
| 86 | + |
---|
| 87 | + return cams; |
---|
| 88 | + } |
---|
| 89 | + |
---|
75 | 90 | public cGridBag GetSeparator() |
---|
76 | 91 | { |
---|
77 | 92 | cGridBag separator = new cGridBag(); |
---|
.. | .. |
---|
83 | 98 | cButton GetButton(String name, boolean border) |
---|
84 | 99 | { |
---|
85 | 100 | ImageIcon icon = GetIcon(name); |
---|
86 | | - if (icon != null) |
---|
| 101 | + if (icon != null || name.contains("/")) |
---|
87 | 102 | return new cButton(icon, border); |
---|
88 | 103 | else |
---|
89 | 104 | return new cButton(name, border); |
---|
.. | .. |
---|
445 | 460 | importOBJItem.addActionListener(this); |
---|
446 | 461 | import3DSItem = menu.add(new MenuItem("3DS file...")); |
---|
447 | 462 | import3DSItem.addActionListener(this); |
---|
| 463 | + if (Globals.ADVANCED) |
---|
| 464 | + { |
---|
448 | 465 | importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file...")); |
---|
449 | 466 | importVRMLX3DItem.addActionListener(this); |
---|
| 467 | + } |
---|
450 | 468 | menu.add("-"); |
---|
451 | 469 | importGFDItem = menu.add(new MenuItem("Grafreed file...")); |
---|
452 | 470 | importGFDItem.addActionListener(this); |
---|
.. | .. |
---|
1318 | 1336 | |
---|
1319 | 1337 | //if (copy.pinned) |
---|
1320 | 1338 | { |
---|
1321 | | - pinButton = GetToggleButton("icons/pin.png", !Grafreed.NIMBUSLAF); |
---|
| 1339 | + pinButton = GetToggleButton("icons/pin.png", !Globals.NIMBUSLAF); |
---|
1322 | 1340 | pinButton.setSelected(copy.pinned); |
---|
1323 | 1341 | cGridBag t = new cGridBag(); |
---|
1324 | 1342 | t.preferredWidth = 2; |
---|
.. | .. |
---|
1550 | 1568 | |
---|
1551 | 1569 | if (cam == null || !(copy.get(0) instanceof cGroup)) |
---|
1552 | 1570 | { |
---|
1553 | | - if (Globals.DEBUG) |
---|
1554 | | - System.out.println("CREATE CAMERAS"); |
---|
1555 | | - cams = new cTemplate(); |
---|
1556 | | - cams.name = "Cameras"; |
---|
1557 | | - copy.insertElementAt(cams, 0); |
---|
1558 | | - //cams.parent = copy; |
---|
1559 | | - |
---|
1560 | | - cam = new Camera(); // LA.newVector(3, 2, 1)); |
---|
1561 | | - cams.addChild(cam); |
---|
1562 | | - cam = new Camera(1); |
---|
1563 | | - cams.addChild(cam); |
---|
1564 | | - cam = new Camera(2); |
---|
1565 | | - cams.addChild(cam); |
---|
1566 | | - cam = new Camera(3); |
---|
1567 | | - cams.addChild(cam); |
---|
1568 | | - cam = new Camera(4); // Light |
---|
1569 | | - cams.addChild(cam); |
---|
| 1571 | + if (Globals.DEBUG) |
---|
| 1572 | + System.out.println("CREATE CAMERAS"); |
---|
| 1573 | + cams = CreateCameras(); |
---|
1570 | 1574 | } else |
---|
1571 | 1575 | { |
---|
1572 | 1576 | cams = (cGroup) copy.get(0); |
---|
.. | .. |
---|
1638 | 1642 | |
---|
1639 | 1643 | resetTransformPanel.preferredHeight = 2; |
---|
1640 | 1644 | |
---|
1641 | | - cButton resetTransform = GetButton("Reset all", !Grafreed.NIMBUSLAF); |
---|
| 1645 | + cButton resetTransform = GetButton("Reset all", !Globals.NIMBUSLAF); |
---|
| 1646 | + resetTransform.setToolTipText("Reset Translation, Rotation and Scale"); |
---|
1642 | 1647 | resetTransform.addMouseListener(new MouseAdapter() |
---|
1643 | 1648 | { |
---|
1644 | 1649 | public void mouseClicked(MouseEvent e) |
---|
.. | .. |
---|
1648 | 1653 | }); |
---|
1649 | 1654 | resetTransformPanel.add(resetTransform); |
---|
1650 | 1655 | |
---|
1651 | | - resetTransform = GetButton("T only", !Grafreed.NIMBUSLAF); |
---|
| 1656 | + resetTransform = GetButton("T only", !Globals.NIMBUSLAF); |
---|
| 1657 | + resetTransform.setToolTipText("Reset Translation only"); |
---|
1652 | 1658 | resetTransform.addMouseListener(new MouseAdapter() |
---|
1653 | 1659 | { |
---|
1654 | 1660 | public void mouseClicked(MouseEvent e) |
---|
.. | .. |
---|
1658 | 1664 | }); |
---|
1659 | 1665 | resetTransformPanel.add(resetTransform); |
---|
1660 | 1666 | |
---|
1661 | | - resetTransform = GetButton("RS only", !Grafreed.NIMBUSLAF); |
---|
| 1667 | + resetTransform = GetButton("RS only", !Globals.NIMBUSLAF); |
---|
| 1668 | + resetTransform.setToolTipText("Reset Rotation and Scale only"); |
---|
1662 | 1669 | resetTransform.addMouseListener(new MouseAdapter() |
---|
1663 | 1670 | { |
---|
1664 | 1671 | public void mouseClicked(MouseEvent e) |
---|
.. | .. |
---|
1715 | 1722 | |
---|
1716 | 1723 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1717 | 1724 | //tmp.setName("Edit"); |
---|
| 1725 | + objectPanel.add(skyboxPanel); |
---|
| 1726 | + objectPanel.setIconAt(0, GetIcon("icons/skybox.jpg")); |
---|
| 1727 | + objectPanel.setToolTipTextAt(0, "Backgrounds"); |
---|
| 1728 | + |
---|
1718 | 1729 | objectPanel.add(toolboxPanel); |
---|
1719 | | - objectPanel.setIconAt(0, GetIcon("icons/primitives.png")); |
---|
1720 | | - objectPanel.setToolTipTextAt(0, "Objects & textures"); |
---|
| 1730 | + objectPanel.setIconAt(1, GetIcon("icons/primitives.png")); |
---|
| 1731 | + objectPanel.setToolTipTextAt(1, "Objects & textures"); |
---|
1721 | 1732 | |
---|
1722 | 1733 | objectPanel.add(materialPanel); |
---|
1723 | | - objectPanel.setIconAt(1, GetIcon("icons/material.png")); |
---|
1724 | | - objectPanel.setToolTipTextAt(1, "Material"); |
---|
| 1734 | + objectPanel.setIconAt(2, GetIcon("icons/material.png")); |
---|
| 1735 | + objectPanel.setToolTipTextAt(2, "Material"); |
---|
1725 | 1736 | |
---|
1726 | | - objectPanel.add(skyboxPanel); |
---|
1727 | | - objectPanel.setIconAt(2, GetIcon("icons/skybox.jpg")); |
---|
1728 | | - objectPanel.setToolTipTextAt(2, "Backgrounds"); |
---|
1729 | | - |
---|
1730 | 1737 | // JPanel north = new JPanel(new BorderLayout()); |
---|
1731 | 1738 | // north.setName("Edit"); |
---|
1732 | 1739 | // north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1733 | 1740 | // objectPanel.add(north); |
---|
1734 | 1741 | objectPanel.add(editPanel); |
---|
1735 | | - objectPanel.setIconAt(3, GetIcon("icons/write.png")); |
---|
| 1742 | + objectPanel.setIconAt(3, GetIcon("icons/writewhite.png")); |
---|
1736 | 1743 | objectPanel.setToolTipTextAt(3, "Edit controls"); |
---|
1737 | 1744 | |
---|
1738 | 1745 | objectPanel.add(transformPanel); |
---|
.. | .. |
---|
1741 | 1748 | |
---|
1742 | 1749 | patchMaterial = true; |
---|
1743 | 1750 | cameraView.patchMaterial = this; |
---|
1744 | | - objectPanel.setSelectedIndex(1); |
---|
| 1751 | + objectPanel.setSelectedIndex(2); |
---|
1745 | 1752 | |
---|
1746 | 1753 | /* |
---|
1747 | 1754 | aConstraints.gridx = 0; |
---|
.. | .. |
---|
1773 | 1780 | |
---|
1774 | 1781 | AddOptions(optionsPanel); //, aConstraints); |
---|
1775 | 1782 | |
---|
1776 | | - tabbedPane.add(optionsPanel); |
---|
1777 | | - |
---|
1778 | 1783 | tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1779 | 1784 | |
---|
| 1785 | + tabbedPane.add(optionsPanel); |
---|
| 1786 | + |
---|
1780 | 1787 | scenePanel.add(tabbedPane); |
---|
1781 | 1788 | |
---|
1782 | | - //if (Globals.ADVANCED) |
---|
1783 | | -// tabbedPane.add(infoPanel); |
---|
1784 | | -// tabbedPane.setIconAt(3, GetIcon("icons/info.png")); |
---|
1785 | | -// tabbedPane.setToolTipTextAt(3, "Information"); |
---|
| 1789 | + cGridBag creditsPanel = new cGridBag().setVertical(true); |
---|
| 1790 | + creditsPanel.setName("Credits"); |
---|
1786 | 1791 | |
---|
| 1792 | + cLabel ogaLabel = new cLabel(" Most Skyboxes courtesy of OpenGameArt!", !Globals.NIMBUSLAF); |
---|
| 1793 | + creditsPanel.add(ogaLabel); |
---|
| 1794 | + |
---|
| 1795 | + cButton creditButton; |
---|
| 1796 | + creditsPanel.add(creditButton = GetButton("icons/sara-logo.png", !Globals.NIMBUSLAF)); |
---|
| 1797 | + creditButton.setToolTipText("https://opengameart.org"); |
---|
| 1798 | + |
---|
| 1799 | + creditButton.addMouseListener(new MouseAdapter() |
---|
| 1800 | + { |
---|
| 1801 | + public void mouseClicked(MouseEvent e) |
---|
| 1802 | + { |
---|
| 1803 | + try |
---|
| 1804 | + { |
---|
| 1805 | + Desktop.getDesktop().browse(new java.net.URI("https://opengameart.org/")); |
---|
| 1806 | + } catch (Exception e1) |
---|
| 1807 | +// } catch (java.io.IOException | java.net.URISyntaxException e1) |
---|
| 1808 | + { |
---|
| 1809 | + e1.printStackTrace(); |
---|
| 1810 | + } |
---|
| 1811 | + } |
---|
| 1812 | + }); |
---|
| 1813 | + |
---|
| 1814 | + ogaLabel = new cLabel(" Download 3D models! (.3ds and .obj only)", !Globals.NIMBUSLAF); |
---|
| 1815 | + creditsPanel.add(ogaLabel); |
---|
| 1816 | + |
---|
| 1817 | + creditsPanel.add(creditButton = GetButton("icons/3delicious.png", !Globals.NIMBUSLAF)); |
---|
| 1818 | + creditButton.setToolTipText("https://3delicious.net"); |
---|
| 1819 | + |
---|
| 1820 | + creditButton.addMouseListener(new MouseAdapter() |
---|
| 1821 | + { |
---|
| 1822 | + public void mouseClicked(MouseEvent e) |
---|
| 1823 | + { |
---|
| 1824 | + try |
---|
| 1825 | + { |
---|
| 1826 | + Desktop.getDesktop().browse(new java.net.URI("https://3delicious.net")); |
---|
| 1827 | + } catch (Exception e1) |
---|
| 1828 | +// } catch (java.io.IOException | java.net.URISyntaxException e1) |
---|
| 1829 | + { |
---|
| 1830 | + e1.printStackTrace(); |
---|
| 1831 | + } |
---|
| 1832 | + } |
---|
| 1833 | + }); |
---|
| 1834 | + |
---|
| 1835 | + creditsPanel.add(creditButton = GetButton("icons/archive3d.png", !Globals.NIMBUSLAF)); |
---|
| 1836 | + creditButton.setToolTipText("https://archive3d.net"); |
---|
| 1837 | + |
---|
| 1838 | + creditButton.addMouseListener(new MouseAdapter() |
---|
| 1839 | + { |
---|
| 1840 | + public void mouseClicked(MouseEvent e) |
---|
| 1841 | + { |
---|
| 1842 | + try |
---|
| 1843 | + { |
---|
| 1844 | + Desktop.getDesktop().browse(new java.net.URI("https://archive3d.net")); |
---|
| 1845 | + } catch (Exception e1) |
---|
| 1846 | +// } catch (java.io.IOException | java.net.URISyntaxException e1) |
---|
| 1847 | + { |
---|
| 1848 | + e1.printStackTrace(); |
---|
| 1849 | + } |
---|
| 1850 | + } |
---|
| 1851 | + }); |
---|
| 1852 | + |
---|
| 1853 | + creditsPanel.add(creditButton = GetButton("icons/turbosquid.png", !Globals.NIMBUSLAF)); |
---|
| 1854 | + creditButton.setToolTipText("https://turbosquid.com"); |
---|
| 1855 | + |
---|
| 1856 | + creditButton.addMouseListener(new MouseAdapter() |
---|
| 1857 | + { |
---|
| 1858 | + public void mouseClicked(MouseEvent e) |
---|
| 1859 | + { |
---|
| 1860 | + try |
---|
| 1861 | + { |
---|
| 1862 | + Desktop.getDesktop().browse(new java.net.URI("https://www.turbosquid.com/Search/3D-Models/free")); |
---|
| 1863 | + } catch (Exception e1) |
---|
| 1864 | +// } catch (java.io.IOException | java.net.URISyntaxException e1) |
---|
| 1865 | + { |
---|
| 1866 | + e1.printStackTrace(); |
---|
| 1867 | + } |
---|
| 1868 | + } |
---|
| 1869 | + }); |
---|
| 1870 | + |
---|
| 1871 | + for (int i=6; --i>=0;) |
---|
| 1872 | + { |
---|
| 1873 | + creditsPanel.add(new cGridBag()); |
---|
| 1874 | + } |
---|
| 1875 | + |
---|
| 1876 | + tabbedPane.add(creditsPanel); |
---|
| 1877 | + tabbedPane.setToolTipTextAt(3, "Credits"); |
---|
| 1878 | + |
---|
| 1879 | + if (Globals.ADVANCED) |
---|
| 1880 | + { |
---|
| 1881 | + tabbedPane.add(infoPanel); |
---|
| 1882 | + tabbedPane.setIconAt(4, GetIcon("icons/info.png")); |
---|
| 1883 | + tabbedPane.setToolTipTextAt(4, "Information"); |
---|
| 1884 | + } |
---|
| 1885 | + |
---|
1787 | 1886 | /* |
---|
1788 | 1887 | cTree jTree = new cTree(null); |
---|
1789 | 1888 | ToolTipManager.sharedInstance().registerComponent(jTree); |
---|
.. | .. |
---|
1929 | 2028 | { |
---|
1930 | 2029 | cGridBag presetpanel = new cGridBag().setVertical(true); |
---|
1931 | 2030 | |
---|
1932 | | - cLabel skin = GetLabel("icons/shadericons/shadericon00000.png", !Grafreed.NIMBUSLAF); |
---|
| 2031 | + cLabel skin = GetLabel("icons/shadericons/shadericon00000.png", !Globals.NIMBUSLAF); |
---|
1933 | 2032 | skin.setToolTipText("Skin"); |
---|
1934 | 2033 | skin.addMouseListener(new MouseAdapter() |
---|
1935 | 2034 | { |
---|
.. | .. |
---|
1967 | 2066 | }); |
---|
1968 | 2067 | presetpanel.add(skin); |
---|
1969 | 2068 | |
---|
1970 | | - cLabel lambert = GetLabel("icons/shadericons/shadericon00002.png", !Grafreed.NIMBUSLAF); |
---|
| 2069 | + cLabel lambert = GetLabel("icons/shadericons/shadericon00002.png", !Globals.NIMBUSLAF); |
---|
1971 | 2070 | lambert.setToolTipText("Diffuse"); |
---|
1972 | 2071 | lambert.addMouseListener(new MouseAdapter() |
---|
1973 | 2072 | { |
---|
.. | .. |
---|
1985 | 2084 | }); |
---|
1986 | 2085 | presetpanel.add(lambert); |
---|
1987 | 2086 | |
---|
1988 | | - cLabel diffuse2 = GetLabel("icons/shadericons/shadericon00003.png", !Grafreed.NIMBUSLAF); |
---|
| 2087 | + cLabel diffuse2 = GetLabel("icons/shadericons/shadericon00003.png", !Globals.NIMBUSLAF); |
---|
1989 | 2088 | diffuse2.setToolTipText("Diffuse2"); |
---|
1990 | 2089 | diffuse2.addMouseListener(new MouseAdapter() |
---|
1991 | 2090 | { |
---|
.. | .. |
---|
2003 | 2102 | }); |
---|
2004 | 2103 | presetpanel.add(diffuse2); |
---|
2005 | 2104 | |
---|
2006 | | - cLabel diffusemoon = GetLabel("icons/shadericons/shadericon00004.png", !Grafreed.NIMBUSLAF); |
---|
| 2105 | + cLabel diffusemoon = GetLabel("icons/shadericons/shadericon00004.png", !Globals.NIMBUSLAF); |
---|
2007 | 2106 | diffusemoon.setToolTipText("Moon"); |
---|
2008 | 2107 | diffusemoon.addMouseListener(new MouseAdapter() |
---|
2009 | 2108 | { |
---|
.. | .. |
---|
2021 | 2120 | }); |
---|
2022 | 2121 | presetpanel.add(diffusemoon); |
---|
2023 | 2122 | |
---|
2024 | | - cLabel diffusemoon2 = GetLabel("icons/shadericons/shadericon00005.png", !Grafreed.NIMBUSLAF); |
---|
| 2123 | + cLabel diffusemoon2 = GetLabel("icons/shadericons/shadericon00005.png", !Globals.NIMBUSLAF); |
---|
2025 | 2124 | diffusemoon2.setToolTipText("Moon2"); |
---|
2026 | 2125 | diffusemoon2.addMouseListener(new MouseAdapter() |
---|
2027 | 2126 | { |
---|
.. | .. |
---|
2039 | 2138 | }); |
---|
2040 | 2139 | presetpanel.add(diffusemoon2); |
---|
2041 | 2140 | |
---|
2042 | | - cLabel diffusemoon3 = GetLabel("icons/shadericons/shadericon00006.png", !Grafreed.NIMBUSLAF); |
---|
| 2141 | + cLabel diffusemoon3 = GetLabel("icons/shadericons/shadericon00006.png", !Globals.NIMBUSLAF); |
---|
2043 | 2142 | diffusemoon3.setToolTipText("Moon3"); |
---|
2044 | 2143 | diffusemoon3.addMouseListener(new MouseAdapter() |
---|
2045 | 2144 | { |
---|
.. | .. |
---|
2057 | 2156 | }); |
---|
2058 | 2157 | presetpanel.add(diffusemoon3); |
---|
2059 | 2158 | |
---|
2060 | | - cLabel diffusesheen = GetLabel("icons/shadericons/shadericon00007.png", !Grafreed.NIMBUSLAF); |
---|
| 2159 | + cLabel diffusesheen = GetLabel("icons/shadericons/shadericon00007.png", !Globals.NIMBUSLAF); |
---|
2061 | 2160 | diffusesheen.setToolTipText("Sheen"); |
---|
2062 | 2161 | diffusesheen.addMouseListener(new MouseAdapter() |
---|
2063 | 2162 | { |
---|
.. | .. |
---|
2074 | 2173 | }); |
---|
2075 | 2174 | presetpanel.add(diffusesheen); |
---|
2076 | 2175 | |
---|
2077 | | - cLabel rough = GetLabel("icons/shadericons/shadericon00001.png", !Grafreed.NIMBUSLAF); |
---|
| 2176 | + cLabel rough = GetLabel("icons/shadericons/shadericon00001.png", !Globals.NIMBUSLAF); |
---|
2078 | 2177 | rough.setToolTipText("Rough metal"); |
---|
2079 | 2178 | rough.addMouseListener(new MouseAdapter() |
---|
2080 | 2179 | { |
---|
.. | .. |
---|
2092 | 2191 | }); |
---|
2093 | 2192 | presetpanel.add(rough); |
---|
2094 | 2193 | |
---|
2095 | | - cLabel rough2 = GetLabel("icons/shadericons/shadericon00013.png", !Grafreed.NIMBUSLAF); |
---|
| 2194 | + cLabel rough2 = GetLabel("icons/shadericons/shadericon00013.png", !Globals.NIMBUSLAF); |
---|
2096 | 2195 | rough2.setToolTipText("Medium metal"); |
---|
2097 | 2196 | rough2.addMouseListener(new MouseAdapter() |
---|
2098 | 2197 | { |
---|
.. | .. |
---|
2110 | 2209 | }); |
---|
2111 | 2210 | presetpanel.add(rough2); |
---|
2112 | 2211 | |
---|
2113 | | - cLabel shini0 = GetLabel("icons/shadericons/shadericon00014.png", !Grafreed.NIMBUSLAF); |
---|
| 2212 | + cLabel shini0 = GetLabel("icons/shadericons/shadericon00014.png", !Globals.NIMBUSLAF); |
---|
2114 | 2213 | shini0.setToolTipText("Shiny"); |
---|
2115 | 2214 | shini0.addMouseListener(new MouseAdapter() |
---|
2116 | 2215 | { |
---|
.. | .. |
---|
2128 | 2227 | }); |
---|
2129 | 2228 | presetpanel.add(shini0); |
---|
2130 | 2229 | |
---|
2131 | | - cLabel shini1 = GetLabel("icons/shadericons/shadericon00011.png", !Grafreed.NIMBUSLAF); |
---|
| 2230 | + cLabel shini1 = GetLabel("icons/shadericons/shadericon00011.png", !Globals.NIMBUSLAF); |
---|
2132 | 2231 | shini1.setToolTipText("Shiny2"); |
---|
2133 | 2232 | shini1.addMouseListener(new MouseAdapter() |
---|
2134 | 2233 | { |
---|
.. | .. |
---|
2146 | 2245 | }); |
---|
2147 | 2246 | presetpanel.add(shini1); |
---|
2148 | 2247 | |
---|
2149 | | - cLabel shini2 = GetLabel("icons/shadericons/shadericon00012.png", !Grafreed.NIMBUSLAF); |
---|
| 2248 | + cLabel shini2 = GetLabel("icons/shadericons/shadericon00012.png", !Globals.NIMBUSLAF); |
---|
2150 | 2249 | shini2.setToolTipText("Shiny3"); |
---|
2151 | 2250 | shini2.addMouseListener(new MouseAdapter() |
---|
2152 | 2251 | { |
---|
.. | .. |
---|
2164 | 2263 | }); |
---|
2165 | 2264 | presetpanel.add(shini2); |
---|
2166 | 2265 | |
---|
2167 | | - cLabel aniso = GetLabel("icons/shadericons/shadericon00008.png", !Grafreed.NIMBUSLAF); |
---|
| 2266 | + cLabel aniso = GetLabel("icons/shadericons/shadericon00008.png", !Globals.NIMBUSLAF); |
---|
2168 | 2267 | aniso.setToolTipText("AnisoU"); |
---|
2169 | 2268 | aniso.addMouseListener(new MouseAdapter() |
---|
2170 | 2269 | { |
---|
.. | .. |
---|
2182 | 2281 | }); |
---|
2183 | 2282 | presetpanel.add(aniso); |
---|
2184 | 2283 | |
---|
2185 | | - cLabel aniso2 = GetLabel("icons/shadericons/shadericon00009.png", !Grafreed.NIMBUSLAF); |
---|
| 2284 | + cLabel aniso2 = GetLabel("icons/shadericons/shadericon00009.png", !Globals.NIMBUSLAF); |
---|
2186 | 2285 | aniso2.setToolTipText("AnisoV"); |
---|
2187 | 2286 | aniso2.addMouseListener(new MouseAdapter() |
---|
2188 | 2287 | { |
---|
.. | .. |
---|
2200 | 2299 | }); |
---|
2201 | 2300 | presetpanel.add(aniso2); |
---|
2202 | 2301 | |
---|
2203 | | - cLabel aniso3 = GetLabel("icons/shadericons/shadericon00010.png", !Grafreed.NIMBUSLAF); |
---|
| 2302 | + cLabel aniso3 = GetLabel("icons/shadericons/shadericon00010.png", !Globals.NIMBUSLAF); |
---|
2204 | 2303 | aniso3.setToolTipText("AnisoUV"); |
---|
2205 | 2304 | aniso3.addMouseListener(new MouseAdapter() |
---|
2206 | 2305 | { |
---|
.. | .. |
---|
2218 | 2317 | }); |
---|
2219 | 2318 | presetpanel.add(aniso3); |
---|
2220 | 2319 | |
---|
2221 | | - cLabel velvet0 = GetLabel("icons/shadericons/shadericon00015.png", !Grafreed.NIMBUSLAF); |
---|
| 2320 | + cLabel velvet0 = GetLabel("icons/shadericons/shadericon00015.png", !Globals.NIMBUSLAF); |
---|
2222 | 2321 | velvet0.setToolTipText("Velvet"); |
---|
2223 | 2322 | velvet0.addMouseListener(new MouseAdapter() |
---|
2224 | 2323 | { |
---|
.. | .. |
---|
2240 | 2339 | }); |
---|
2241 | 2340 | presetpanel.add(velvet0); |
---|
2242 | 2341 | |
---|
2243 | | - cLabel bump0 = GetLabel("icons/shadericons/shadericon00016.png", !Grafreed.NIMBUSLAF); |
---|
| 2342 | + cLabel bump0 = GetLabel("icons/shadericons/shadericon00016.png", !Globals.NIMBUSLAF); |
---|
2244 | 2343 | bump0.setToolTipText("Bump texture"); |
---|
2245 | 2344 | bump0.addMouseListener(new MouseAdapter() |
---|
2246 | 2345 | { |
---|
.. | .. |
---|
2259 | 2358 | }); |
---|
2260 | 2359 | presetpanel.add(bump0); |
---|
2261 | 2360 | |
---|
2262 | | - cLabel borderShader = GetLabel("icons/shadericons/borderfade.jpg", !Grafreed.NIMBUSLAF); |
---|
| 2361 | + cLabel borderShader = GetLabel("icons/shadericons/borderfade.jpg", !Globals.NIMBUSLAF); |
---|
2263 | 2362 | borderShader.setToolTipText("Border fade"); |
---|
2264 | 2363 | borderShader.addMouseListener(new MouseAdapter() |
---|
2265 | 2364 | { |
---|
.. | .. |
---|
2274 | 2373 | }); |
---|
2275 | 2374 | presetpanel.add(borderShader); |
---|
2276 | 2375 | |
---|
2277 | | - cLabel halo = GetLabel("icons/shadericons/shadericon00017.png", !Grafreed.NIMBUSLAF); |
---|
| 2376 | + cLabel halo = GetLabel("icons/shadericons/shadericon00017.png", !Globals.NIMBUSLAF); |
---|
2278 | 2377 | halo.setToolTipText("Halo"); |
---|
2279 | 2378 | halo.addMouseListener(new MouseAdapter() |
---|
2280 | 2379 | { |
---|
.. | .. |
---|
2291 | 2390 | }); |
---|
2292 | 2391 | presetpanel.add(halo); |
---|
2293 | 2392 | |
---|
2294 | | - cLabel candle = GetLabel("icons/shadericons/shadericon00018.png", !Grafreed.NIMBUSLAF); |
---|
| 2393 | + cLabel candle = GetLabel("icons/shadericons/shadericon00018.png", !Globals.NIMBUSLAF); |
---|
2295 | 2394 | candle.setToolTipText("Candle"); |
---|
2296 | 2395 | candle.addMouseListener(new MouseAdapter() |
---|
2297 | 2396 | { |
---|
.. | .. |
---|
2313 | 2412 | }); |
---|
2314 | 2413 | presetpanel.add(candle); |
---|
2315 | 2414 | |
---|
2316 | | - cLabel shadowShader = GetLabel("icons/shadericons/shadow.png", !Grafreed.NIMBUSLAF); |
---|
| 2415 | + cLabel shadowShader = GetLabel("icons/shadericons/shadow.png", !Globals.NIMBUSLAF); |
---|
2317 | 2416 | shadowShader.setToolTipText("Shadow"); |
---|
2318 | 2417 | shadowShader.addMouseListener(new MouseAdapter() |
---|
2319 | 2418 | { |
---|
.. | .. |
---|
2348 | 2447 | |
---|
2349 | 2448 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
2350 | 2449 | |
---|
2351 | | - editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 2450 | + editBar.add(createMaterialButton = new cButton("Create", !Globals.NIMBUSLAF)); // , aConstraints); |
---|
2352 | 2451 | createMaterialButton.setToolTipText("Create material"); |
---|
2353 | 2452 | |
---|
2354 | 2453 | /* |
---|
2355 | 2454 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
2356 | 2455 | */ |
---|
2357 | 2456 | |
---|
2358 | | - editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 2457 | + editBar.add(clearMaterialButton = new cButton("Clear", !Globals.NIMBUSLAF)); // , aConstraints); |
---|
2359 | 2458 | clearMaterialButton.setToolTipText("Clear material"); |
---|
2360 | 2459 | |
---|
2361 | 2460 | if (Globals.ADVANCED) |
---|
2362 | 2461 | { |
---|
2363 | | - editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 2462 | + editBar.add(resetSlidersButton = new cButton("Reset", !Globals.NIMBUSLAF)); // , aConstraints); |
---|
2364 | 2463 | editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
2365 | 2464 | editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
2366 | 2465 | } |
---|
.. | .. |
---|
4161 | 4260 | |
---|
4162 | 4261 | void New() |
---|
4163 | 4262 | { |
---|
4164 | | - while (copy.Size() > 1) |
---|
| 4263 | + while (copy.Size() > 0) |
---|
4165 | 4264 | { |
---|
4166 | | - copy.remove(1); |
---|
| 4265 | + copy.remove(0); |
---|
4167 | 4266 | } |
---|
4168 | 4267 | |
---|
| 4268 | + copy.selection.clear(); |
---|
| 4269 | + |
---|
| 4270 | + if (copy == Grafreed.grafreed.universe) |
---|
| 4271 | + { |
---|
| 4272 | + CreateCameras(); |
---|
| 4273 | + cameraView.SetCamera(GetCamera(copy, 0)); |
---|
| 4274 | + } |
---|
4169 | 4275 | ResetModel(); |
---|
4170 | 4276 | objEditor.refreshContents(); |
---|
4171 | 4277 | } |
---|