Normand Briere
2019-06-24 47cd0f0a3870d843cb758535316060d30f15c811
ObjEditor.java
....@@ -52,6 +52,19 @@
5252 }
5353 }
5454
55
+ cToggleButton GetToggleButton(String name, boolean border)
56
+ {
57
+ try
58
+ {
59
+ ImageIcon icon = GetIcon(name);
60
+ return new cToggleButton(icon, border);
61
+ }
62
+ catch (Exception e)
63
+ {
64
+ return new cToggleButton(name, border);
65
+ }
66
+ }
67
+
5568 cCheckBox GetCheckBox(String name, boolean border)
5669 {
5770 try
....@@ -384,9 +397,12 @@
384397 editPanel.add(editCommandsPanel);
385398 editPanel.add(ctrlPanel);
386399
387
- materialPanel = new cGridBag().setVertical(true);
400
+ toolboxPanel = new cGridBag().setVertical(false);
401
+ toolboxPanel.setName("Toolbox");
388402
403
+ materialPanel = new cGridBag().setVertical(true);
389404 materialPanel.setName("Material");
405
+
390406 /*JTextPane*/
391407 infoarea = createTextPane();
392408 doc = infoarea.getStyledDocument();
....@@ -659,6 +675,8 @@
659675
660676 boolean maximized;
661677
678
+ cButton fullscreenLayout;
679
+
662680 void Minimize()
663681 {
664682 frame.setState(Frame.ICONIFIED);
....@@ -720,7 +738,7 @@
720738 // X frame.getContentPane().add(/*"Center",*/bigThree);
721739 framePanel.setDividerLocation(0);
722740
723
- radio.layout = twoButton;
741
+ radio.layout = fullscreenLayout;
724742 radio.layout.doClick();
725743 //frame.setVisible(true);
726744 }
....@@ -1394,6 +1412,7 @@
13941412
13951413 //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
13961414 //tmp.setName("Edit");
1415
+ objectPanel.add(toolboxPanel);
13971416 objectPanel.add(materialPanel);
13981417 // JPanel north = new JPanel(new BorderLayout());
13991418 // north.setName("Edit");
....@@ -3726,7 +3745,7 @@
37263745 assert false;
37273746 }
37283747
3729
- void EditSelection()
3748
+ void EditSelection(boolean newWindow)
37303749 {
37313750 }
37323751
....@@ -4221,7 +4240,7 @@
42214240
42224241 void makeSomething(Object3D thing, boolean resetmodel) // deselect)
42234242 {
4224
- if (Globals.SAVEONMAKE)
4243
+ if (Globals.SAVEONMAKE) // && resetmodel)
42254244 Save();
42264245 //Tween.set(thing, 0).target(1).start(tweenManager);
42274246 //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager);
....@@ -4309,6 +4328,12 @@
43094328 {
43104329 ResetModel();
43114330 Select(thing.GetTreePath(), true, false); // unselect... false);
4331
+
4332
+ if (thing.Size() == 0)
4333
+ {
4334
+ //EditSelection(false);
4335
+ }
4336
+
43124337 refreshContents();
43134338 }
43144339
....@@ -4903,18 +4928,29 @@
49034928 CheckboxMenuItem togglePaintItem;
49044929 JSplitPane mainPanel;
49054930 JScrollPane scrollpane;
4931
+
49064932 JPanel toolbarPanel;
4933
+
49074934 cGridBag treePanel;
4935
+
49084936 JPanel radioPanel;
49094937 ButtonGroup buttonGroup;
4910
- cGridBag ctrlPanel;
4938
+
4939
+ cGridBag toolboxPanel;
49114940 cGridBag materialPanel;
4941
+ cGridBag ctrlPanel;
4942
+
49124943 JScrollPane infoPanel;
4944
+
49134945 cGridBag optionsPanel;
4946
+
49144947 JTabbedPane objectPanel;
4948
+
49154949 cGridBag XYZPanel;
4950
+
49164951 JSplitPane gridPanel;
49174952 JSplitPane bigPanel;
4953
+
49184954 cGridBag bigThree;
49194955 cGridBag scenePanel;
49204956 cGridBag centralPanel;
....@@ -5029,7 +5065,7 @@
50295065 cNumberSlider fogField;
50305066 JLabel opacityPowerLabel;
50315067 cNumberSlider opacityPowerField;
5032
- JTree jTree;
5068
+ cTree jTree;
50335069 //ObjectUI parent;
50345070
50355071 cNumberSlider normalpushField;