Camera.java | ●●●●● patch | view | raw | blame | history | |
CameraPane.java | ●●●●● patch | view | raw | blame | history | |
Grafreed.java | ●●●●● patch | view | raw | blame | history | |
GroupEditor.java | ●●●●● patch | view | raw | blame | history | |
ObjEditor.java | ●●●●● patch | view | raw | blame | history | |
icons/checkbox.png | patch | view | raw | blame | history | |
icons/writewhite.png | patch | view | raw | blame | history |
Camera.java
.. .. @@ -71,7 +71,7 @@ 71 71 perspective = false; 72 72 break; 73 73 case 4: // Default light 74 - location = LA.newVector(-10, 30, 20);74 + location = LA.newVector(-5, 20, 10);75 75 perspective = false; 76 76 break; 77 77 } CameraPane.java
.. .. @@ -10699,7 +10699,7 @@ 10699 10699 if (patchMaterial.patchMaterial) 10700 10700 { 10701 10701 patchMaterial.patchMaterial = false; 10702 - patchMaterial.objectPanel.setSelectedIndex(0);10702 + patchMaterial.objectPanel.setSelectedIndex(1);10703 10703 } 10704 10704 10705 10705 if (Grafreed.savesound && Grafreed.hassound) Grafreed.java
.. .. @@ -881,7 +881,6 @@ 881 881 // try{Thread.sleep(5000);}catch(Exception e){} 882 882 // PlayAudio("/Users/nbriere/Downloads/Footsteps-6.wav", 4, 1); 883 883 884 -885 884 /**/ 886 885 if (Globals.NIMBUSLAF) 887 886 { .. .. @@ -934,6 +933,8 @@ 934 933 935 934 ui = UIManager.getDefaults(); 936 935 936 + x = ui.get("RadioButton.icon");937 +937 938 ArrayList gradient = new java.util.ArrayList(5); 938 939 gradient.add(1.0); 939 940 gradient.add(0.0); .. .. @@ -943,9 +944,9 @@ 943 944 944 945 ui.put("Button.gradient", gradient); 945 946 946 - //ui.put("RadioButton.icon", ObjEditor.GetIcon("icons/white-sphere-icon.png"));947 - //ui.put("RadioButtonMenuItem.checkIcon", ObjEditor.GetIcon("icons/fit.png"));948 - //ui.put("RadioButtonMenuItem.arrowIcon", ObjEditor.GetIcon("icons/fit.png"));947 + //ui.put("RadioButton.icon", new CheckBox()); //ObjEditor.GetIcon("icons/white-sphere-icon.png")));948 + ui.put("CheckBox.icon", new CheckBox()); //ObjEditor.GetIcon("icons/white-sphere-icon.png")));949 + //ui.put("CheckBoxMenuItem.checkIcon", ObjEditor.GetIcon("icons/white-sphere-icon.png"));949 950 950 951 ui.put("Slider.foreground", new javax.swing.plaf.ColorUIResource(0,0,0)); 951 952 ui.put("Slider.horizontalThumbIcon", ObjEditor.GetIcon("icons/white-sphere-icon.png")); .. .. @@ -1015,7 +1016,9 @@ 1015 1016 1016 1017 //Monitor mon=MonitorFactory.start("myFirstMonitor"); 1017 1018 standAlone = true; 1018 - grafreed = new Grafreed();1019 +1020 + grafreed = new Grafreed();1021 +1019 1022 grafreed.materials = ReadGFD(grafreed.getClass().getClassLoader().getResourceAsStream("gfd/materials.gfd")); 1020 1023 1021 1024 grafreed.universe = new cGroup(); .. .. @@ -1035,6 +1038,33 @@ 1035 1038 javax.swing.ToolTipManager.sharedInstance().setEnabled(Globals.TOOLTIPS); 1036 1039 } 1037 1040 1041 + static class CheckBox extends javax.swing.plaf.metal.MetalCheckBoxIcon1042 + {1043 + java.awt.image.BufferedImage image;1044 +1045 + CheckBox()1046 + {1047 + try1048 + {1049 + image = javax.imageio.ImageIO.read(ObjEditor.class.getClassLoader().getResourceAsStream("icons/checkbox.png"));1050 + }1051 + catch (Exception e)1052 + {1053 + }1054 + }1055 +1056 + protected void drawCheck(Component c, Graphics g, int x, int y)1057 + {1058 + super.drawCheck(c, g, x, y);1059 + }1060 +1061 + public void paintIcon(Component c, Graphics g, int x, int y)1062 + {1063 + g.drawImage(image, x-1, y-1, 19, 19, null);1064 + super.paintIcon(c, g, x+2, y+2);1065 + }1066 + }1067 +1038 1068 static Object3D materials; 1039 1069 1040 1070 static Object3D ReadGFD(java.io.InputStream istream) GroupEditor.java
.. .. @@ -347,7 +347,7 @@ 347 347 348 348 public void CreateSkyboxPanel(cGridBag skyboxPanel) 349 349 { 350 - JTabbedPane skyboxpane = new JTabbedPane();350 + JTabbedPane skyboxpane = new JTabbedPane(JTabbedPane.LEFT);351 351 352 352 AddSkyboxTab0(skyboxpane); 353 353 AddSkyboxTab1(skyboxpane); ObjEditor.java
.. .. @@ -72,6 +72,21 @@ 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(); .. .. @@ -1550,23 +1565,9 @@ 1550 1565 1551 1566 if (cam == null || !(copy.get(0) instanceof cGroup)) 1552 1567 { 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); // Light1569 - cams.addChild(cam);1568 + if (Globals.DEBUG)1569 + System.out.println("CREATE CAMERAS");1570 + cams = CreateCameras();1570 1571 } else 1571 1572 { 1572 1573 cams = (cGroup) copy.get(0); .. .. @@ -1718,24 +1719,24 @@ 1718 1719 1719 1720 //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); 1720 1721 //tmp.setName("Edit"); 1722 + objectPanel.add(skyboxPanel);1723 + objectPanel.setIconAt(0, GetIcon("icons/skybox.jpg"));1724 + objectPanel.setToolTipTextAt(0, "Backgrounds");1725 +1721 1726 objectPanel.add(toolboxPanel); 1722 - objectPanel.setIconAt(0, GetIcon("icons/primitives.png"));1723 - objectPanel.setToolTipTextAt(0, "Objects & textures");1727 + objectPanel.setIconAt(1, GetIcon("icons/primitives.png"));1728 + objectPanel.setToolTipTextAt(1, "Objects & textures");1724 1729 1725 1730 objectPanel.add(materialPanel); 1726 - objectPanel.setIconAt(1, GetIcon("icons/material.png"));1727 - objectPanel.setToolTipTextAt(1, "Material");1731 + objectPanel.setIconAt(2, GetIcon("icons/material.png"));1732 + objectPanel.setToolTipTextAt(2, "Material");1728 1733 1729 - objectPanel.add(skyboxPanel);1730 - objectPanel.setIconAt(2, GetIcon("icons/skybox.jpg"));1731 - objectPanel.setToolTipTextAt(2, "Backgrounds");1732 -1733 1734 // JPanel north = new JPanel(new BorderLayout()); 1734 1735 // north.setName("Edit"); 1735 1736 // north.add(ctrlPanel, BorderLayout.NORTH); 1736 1737 // objectPanel.add(north); 1737 1738 objectPanel.add(editPanel); 1738 - objectPanel.setIconAt(3, GetIcon("icons/write.png"));1739 + objectPanel.setIconAt(3, GetIcon("icons/writewhite.png"));1739 1740 objectPanel.setToolTipTextAt(3, "Edit controls"); 1740 1741 1741 1742 objectPanel.add(transformPanel); .. .. @@ -1744,7 +1745,7 @@ 1744 1745 1745 1746 patchMaterial = true; 1746 1747 cameraView.patchMaterial = this; 1747 - objectPanel.setSelectedIndex(1);1748 + objectPanel.setSelectedIndex(2);1748 1749 1749 1750 /* 1750 1751 aConstraints.gridx = 0; .. .. @@ -4206,8 +4207,12 @@ 4206 4207 4207 4208 copy.selection.clear(); 4208 4209 4210 + if (copy == Grafreed.grafreed.universe)4211 + {4212 + CreateCameras();4213 + cameraView.SetCamera(GetCamera(copy, 0));4214 + }4209 4215 ResetModel(); 4210 - SetupViews();4211 4216 objEditor.refreshContents(); 4212 4217 } 4213 4218 icons/checkbox.pngBinary files differ
icons/writewhite.pngBinary files differ