.. | .. |
---|
23 | 23 | DragGestureListener, DragSourceListener, DropTargetListener, |
---|
24 | 24 | ItemListener // ListSelectionListener |
---|
25 | 25 | { |
---|
| 26 | + |
---|
| 27 | + public void AddSkyboxButton(String f, String s, cGridBag row3) |
---|
| 28 | + { |
---|
| 29 | + cButton skyboxButton; |
---|
| 30 | + final String path = "cubemaps/" + f + "-skyboxes/" + s; |
---|
| 31 | + row3.add(skyboxButton = GetButton(path + "/" + s + ".jpg", !Grafreed.NIMBUSLAF)); |
---|
| 32 | + skyboxButton.setToolTipText(s); |
---|
| 33 | + skyboxButton.addActionListener(new ActionListener() |
---|
| 34 | + { |
---|
| 35 | + @Override |
---|
| 36 | + public void actionPerformed(ActionEvent e) |
---|
| 37 | + { |
---|
| 38 | + ChangeSkybox(path); |
---|
| 39 | + } |
---|
| 40 | + }); |
---|
| 41 | + } |
---|
| 42 | + |
---|
| 43 | + public void ChangeSkybox(String name) |
---|
| 44 | + { |
---|
| 45 | + cameraView.envyoff = false; |
---|
| 46 | + cameraView.skyboxname = name; |
---|
| 47 | + cameraView.skyboxext = "jpg"; |
---|
| 48 | + cameraView.repaint(); |
---|
| 49 | + } |
---|
| 50 | + |
---|
26 | 51 | //ObjEditor objEditor; |
---|
27 | 52 | public void closeUI2() |
---|
28 | 53 | { |
---|
.. | .. |
---|
608 | 633 | */ |
---|
609 | 634 | cGridBag copyOptionsPanel = new cGridBag(); |
---|
610 | 635 | |
---|
611 | | - copyOptionsPanel.preferredHeight = 1; |
---|
| 636 | + copyOptionsPanel.preferredHeight = 2; |
---|
612 | 637 | |
---|
613 | 638 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
614 | 639 | |
---|
.. | .. |
---|
722 | 747 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
723 | 748 | //clearButton.addActionListener(this); |
---|
724 | 749 | |
---|
| 750 | + cGridBag row1 = new cGridBag(); |
---|
| 751 | + |
---|
725 | 752 | // INSERT |
---|
726 | | - oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 753 | + row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
727 | 754 | gridButton.setToolTipText("Create grid"); |
---|
728 | 755 | gridButton.addActionListener(this); |
---|
729 | 756 | |
---|
730 | | - oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 757 | + row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
731 | 758 | boxButton.setToolTipText("Create box"); |
---|
732 | 759 | boxButton.addActionListener(this); |
---|
733 | 760 | |
---|
734 | | - oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 761 | + row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
735 | 762 | sphereButton.setToolTipText("Create sphere"); |
---|
736 | 763 | sphereButton.addActionListener(this); |
---|
737 | 764 | |
---|
738 | | - oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 765 | + row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
739 | 766 | coneButton.setToolTipText("Create cone"); |
---|
740 | 767 | coneButton.addActionListener(this); |
---|
741 | 768 | |
---|
742 | | - oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 769 | + row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
743 | 770 | torusButton.setToolTipText("Create torus"); |
---|
744 | 771 | torusButton.addActionListener(this); |
---|
745 | 772 | |
---|
746 | | - oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 773 | + row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
747 | 774 | superButton.setToolTipText("Create superellipsoid"); |
---|
748 | 775 | superButton.addActionListener(this); |
---|
749 | 776 | |
---|
.. | .. |
---|
754 | 781 | kleinButton.addActionListener(this); |
---|
755 | 782 | } |
---|
756 | 783 | |
---|
757 | | - oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 784 | + row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
758 | 785 | particlesButton.setToolTipText("Create particle system"); |
---|
759 | 786 | particlesButton.addActionListener(this); |
---|
760 | 787 | |
---|
761 | | - oe.toolboxPanel.Return(); |
---|
| 788 | + oe.toolboxPanel.add(row1); |
---|
762 | 789 | |
---|
763 | | - oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 790 | + cGridBag row2 = new cGridBag(); |
---|
| 791 | + |
---|
| 792 | + row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
764 | 793 | groupButton.setToolTipText("Create group"); |
---|
765 | 794 | groupButton.addActionListener(this); |
---|
766 | 795 | |
---|
767 | | - oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 796 | + row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
768 | 797 | compositeButton.setToolTipText("Create composite"); |
---|
769 | 798 | compositeButton.addActionListener(this); |
---|
770 | 799 | |
---|
771 | | - oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 800 | + row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
772 | 801 | switchButton.setToolTipText("Create item switcher"); |
---|
773 | 802 | switchButton.addActionListener(this); |
---|
774 | 803 | |
---|
775 | | - oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 804 | + row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
776 | 805 | loopButton.setToolTipText("Create loop"); |
---|
777 | 806 | loopButton.addActionListener(this); |
---|
778 | 807 | |
---|
779 | | - oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 808 | + row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
780 | 809 | textureButton.setToolTipText("Create texture"); |
---|
781 | 810 | textureButton.addActionListener(this); |
---|
782 | 811 | |
---|
783 | | - oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 812 | + row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
784 | 813 | overlayButton.setToolTipText("Create overlay"); |
---|
785 | 814 | overlayButton.addActionListener(this); |
---|
786 | 815 | |
---|
787 | | - oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 816 | + row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
788 | 817 | lightButton.setToolTipText("Create light"); |
---|
789 | 818 | lightButton.addActionListener(this); |
---|
790 | 819 | |
---|
791 | | - for (int i=6; --i>=0;) |
---|
| 820 | + oe.toolboxPanel.add(row2); |
---|
| 821 | + |
---|
| 822 | + // ENVYMAPS |
---|
| 823 | + cGridBag row3 = new cGridBag(); |
---|
| 824 | + row3.preferredHeight = 20; |
---|
| 825 | + |
---|
| 826 | + AddSkyboxButton("default", "rgb", row3); |
---|
| 827 | + AddSkyboxButton("default", "cornell", row3); |
---|
| 828 | + AddSkyboxButton("default", "uffizi", row3); |
---|
| 829 | + AddSkyboxButton("default", "CloudyHills", row3); |
---|
| 830 | + AddSkyboxButton("default", "skycube", row3); |
---|
| 831 | + |
---|
| 832 | + oe.toolboxPanel.add(row3); |
---|
| 833 | + |
---|
| 834 | + cGridBag row4 = new cGridBag(); |
---|
| 835 | + row4.preferredHeight = 20; |
---|
| 836 | + |
---|
| 837 | + AddSkyboxButton("bridge", "Bridge2", row4); |
---|
| 838 | + AddSkyboxButton("urban", "GamlaStan2", row4); |
---|
| 839 | + AddSkyboxButton("urban", "Parliament", row4); |
---|
| 840 | + AddSkyboxButton("urban", "Roundabout", row4); |
---|
| 841 | + |
---|
| 842 | + oe.toolboxPanel.add(row4); |
---|
| 843 | + |
---|
| 844 | + cGridBag row5 = new cGridBag(); |
---|
| 845 | + row5.preferredHeight = 20; |
---|
| 846 | + |
---|
| 847 | + AddSkyboxButton("urban", "SaintLazarusChurch", row5); |
---|
| 848 | + AddSkyboxButton("urban", "SaintLazarusChurch2", row5); |
---|
| 849 | + AddSkyboxButton("urban", "SaintLazarusChurch3", row5); |
---|
| 850 | + AddSkyboxButton("urban", "UnionSquare", row5); |
---|
| 851 | + |
---|
| 852 | + oe.toolboxPanel.add(row5); |
---|
| 853 | + |
---|
| 854 | + cGridBag row6 = new cGridBag(); |
---|
| 855 | + row6.preferredHeight = 20; |
---|
| 856 | + |
---|
| 857 | + AddSkyboxButton("park", "BerzeliiPark", row6); |
---|
| 858 | + AddSkyboxButton("park", "Buddha", row6); |
---|
| 859 | + AddSkyboxButton("park", "CNTower2", row6); |
---|
| 860 | + //AddSkyboxButton("park", "Fatbursparken", row6); |
---|
| 861 | + AddSkyboxButton("park", "NiagaraFalls1", row6); |
---|
| 862 | + |
---|
| 863 | + oe.toolboxPanel.add(row6); |
---|
| 864 | + |
---|
| 865 | + cGridBag row7 = new cGridBag(); |
---|
| 866 | + row7.preferredHeight = 20; |
---|
| 867 | + |
---|
| 868 | + AddSkyboxButton("park", "NiagaraFalls3", row7); |
---|
| 869 | + AddSkyboxButton("park", "Park", row7); |
---|
| 870 | + //AddSkyboxButton("park", "Park2", row6); |
---|
| 871 | + //AddSkyboxButton("park", "Path", row6); |
---|
| 872 | + AddSkyboxButton("park", "Pond", row7); |
---|
| 873 | + AddSkyboxButton("park", "Skansen", row7); |
---|
| 874 | + |
---|
| 875 | + oe.toolboxPanel.add(row7); |
---|
| 876 | + |
---|
| 877 | + cGridBag row8 = new cGridBag(); |
---|
| 878 | + row8.preferredHeight = 20; |
---|
| 879 | + |
---|
| 880 | + AddSkyboxButton("park", "Skansen2", row8); |
---|
| 881 | + AddSkyboxButton("park", "Skansen3", row8); |
---|
| 882 | + AddSkyboxButton("park", "Skansen4", row8); |
---|
| 883 | + AddSkyboxButton("park", "Skansen5", row8); |
---|
| 884 | + |
---|
| 885 | + oe.toolboxPanel.add(row8); |
---|
| 886 | + |
---|
| 887 | + cGridBag row9 = new cGridBag(); |
---|
| 888 | + row9.preferredHeight = 20; |
---|
| 889 | + |
---|
| 890 | + AddSkyboxButton("park", "Stairs", row9); |
---|
| 891 | + //AddSkyboxButton("park", "Tantolunden", row6); |
---|
| 892 | + //AddSkyboxButton("park", "Tantolunden3", row6); |
---|
| 893 | + AddSkyboxButton("park", "Tantolunden4", row9); |
---|
| 894 | + |
---|
| 895 | + oe.toolboxPanel.add(row9); |
---|
| 896 | +/* |
---|
| 897 | +BerzeliiPark |
---|
| 898 | +Buddha |
---|
| 899 | +CNTower2 |
---|
| 900 | +Fatbursparken |
---|
| 901 | +NiagaraFalls1 |
---|
| 902 | +NiagaraFalls3 |
---|
| 903 | +Park |
---|
| 904 | +Park2 |
---|
| 905 | +Path |
---|
| 906 | +Pond |
---|
| 907 | +Skansen |
---|
| 908 | +Skansen2 |
---|
| 909 | +Skansen3 |
---|
| 910 | +Skansen4 |
---|
| 911 | +Skansen5 |
---|
| 912 | +Stairs |
---|
| 913 | +Tantolunden |
---|
| 914 | +Tantolunden3 |
---|
| 915 | +Tantolunden4 |
---|
| 916 | + */ |
---|
| 917 | + |
---|
| 918 | + for (int i=1; --i>=0;) |
---|
792 | 919 | { |
---|
793 | | - oe.toolboxPanel.Return(); |
---|
794 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
795 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
796 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
797 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
798 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
799 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
800 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
| 920 | + //oe.toolboxPanel.Return(); |
---|
| 921 | + oe.toolboxPanel.add(new cGridBag()); |
---|
801 | 922 | } |
---|
802 | 923 | |
---|
803 | 924 | // EDIT panel |
---|
.. | .. |
---|
858 | 979 | versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
859 | 980 | sliderPane.preferredHeight = 1; |
---|
860 | 981 | |
---|
861 | | -// mainPanel.setDividerLocation(0.5); //1.0); |
---|
862 | | -// mainPanel.setResizeWeight(0.5); |
---|
| 982 | +// mainPanel.setDividerLocation(0.1); //1.0); |
---|
| 983 | + mainPanel.setResizeWeight(0.4); |
---|
863 | 984 | |
---|
864 | 985 | //jList.addListSelectionListener(this); |
---|
865 | 986 | oe.jTree.addTreeSelectionListener(this); |
---|
.. | .. |
---|
867 | 988 | //jTree.setEditable(true); |
---|
868 | 989 | oe.jTree.setDragEnabled(true); |
---|
869 | 990 | //jTree.setPreferredSize(new Dimension(10,10)); |
---|
870 | | - jSP.setPreferredSize(new Dimension(100,200)); |
---|
| 991 | + //jSP.setPreferredSize(new Dimension(100,200)); |
---|
871 | 992 | |
---|
872 | 993 | oe.jTree.setCellRenderer(new cTreeModel.Renderer()); |
---|
873 | 994 | |
---|
.. | .. |
---|
2139 | 2260 | { |
---|
2140 | 2261 | makeSomething(new Light()); |
---|
2141 | 2262 | } else |
---|
| 2263 | +// if (source == skybox1Button || |
---|
| 2264 | +// source == skybox2Button || |
---|
| 2265 | +// source == skybox3Button || |
---|
| 2266 | +// source == skybox4Button || |
---|
| 2267 | +// source == skybox5Button || |
---|
| 2268 | +// source == skybox6Button || |
---|
| 2269 | +// source == skybox7Button || |
---|
| 2270 | +// source == skybox11Button || |
---|
| 2271 | +// source == skybox12Button || |
---|
| 2272 | +// source == skybox13Button || |
---|
| 2273 | +// source == skybox14Button || |
---|
| 2274 | +// source == skybox15Button || |
---|
| 2275 | +// source == skybox16Button || |
---|
| 2276 | +// source == skybox17Button) |
---|
| 2277 | +// { |
---|
| 2278 | +// ChangeSkybox(source); |
---|
| 2279 | +// } else |
---|
2142 | 2280 | if (source == csgItem) |
---|
2143 | 2281 | { |
---|
2144 | 2282 | group(new CSG()); |
---|
.. | .. |
---|
2224 | 2362 | if (source == computeAOItem) |
---|
2225 | 2363 | { |
---|
2226 | 2364 | Globals.drawMode = CameraPane.OCCLUSION; |
---|
2227 | | - Globals.theRenderer.repaint(); |
---|
| 2365 | + cameraView.repaint(); |
---|
2228 | 2366 | } else |
---|
2229 | 2367 | if (source == recompileItem) |
---|
2230 | 2368 | { |
---|
.. | .. |
---|
5676 | 5814 | cButton loopButton; |
---|
5677 | 5815 | cButton textureButton; |
---|
5678 | 5816 | |
---|
| 5817 | + cButton skybox1Button; |
---|
| 5818 | + cButton skybox2Button; |
---|
| 5819 | + cButton skybox3Button; |
---|
| 5820 | + cButton skybox4Button; |
---|
| 5821 | + cButton skybox5Button; |
---|
| 5822 | + cButton skybox6Button; |
---|
| 5823 | + cButton skybox7Button; |
---|
| 5824 | + |
---|
| 5825 | + cButton skybox11Button; |
---|
| 5826 | + cButton skybox12Button; |
---|
| 5827 | + cButton skybox13Button; |
---|
| 5828 | + cButton skybox14Button; |
---|
| 5829 | + cButton skybox15Button; |
---|
| 5830 | + cButton skybox16Button; |
---|
| 5831 | + cButton skybox17Button; |
---|
| 5832 | + |
---|
5679 | 5833 | cButton gridButton; |
---|
5680 | 5834 | cButton boxButton; |
---|
5681 | 5835 | cButton sphereButton; |
---|