From f1382bc839a74ef1d1534c61ea94e53cf54716df Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Sun, 23 Jun 2019 15:00:47 -0400
Subject: [PATCH] Edit panel
---
ObjEditor.java | 34 +++++++++++-----
GroupEditor.java | 36 ++++++++---------
2 files changed, 40 insertions(+), 30 deletions(-)
diff --git a/GroupEditor.java b/GroupEditor.java
index 14b61ed..8646c14 100644
--- a/GroupEditor.java
+++ b/GroupEditor.java
@@ -176,7 +176,6 @@
copyItem.addActionListener(this);
pasteItem = menu.add(new MenuItem("Paste"));
pasteItem.addActionListener(this);
- menu.add("-");
menu.add("-");
pasteIntoItem = menu.add(new MenuItem("Paste into"));
@@ -369,11 +368,11 @@
billboardItem.addActionListener(this);
csgItem = menu.add(new MenuItem("CSG"));
csgItem.addActionListener(this);
- shadowXItem = menu.add(new MenuItem("Shadow X"));
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
shadowXItem.addActionListener(this);
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
shadowYItem.addActionListener(this);
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
shadowZItem.addActionListener(this);
if (Globals.ADVANCED)
{
@@ -637,19 +636,19 @@
oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
+ oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
twoButton.setToolTipText("Show center view only");
twoButton.addActionListener(this);
- oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
+ oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
fourButton.addActionListener(this);
fourButton.setToolTipText("Show left panel only");
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
+ oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
sixButton.setToolTipText("2-column layout left");
sixButton.addActionListener(this);
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
+ oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
threeButton.setToolTipText("2-column layout right");
threeButton.addActionListener(this);
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
+ oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
sevenButton.setToolTipText("3-column layout");
sevenButton.addActionListener(this);
//
@@ -664,32 +663,30 @@
//oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
//clearButton.addActionListener(this);
- cGridBag commandsPanel = new cGridBag();
-
- commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
+ editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
editButton.setToolTipText("Edit selection");
editButton.addActionListener(this);
- commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
+ editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
uneditButton.setToolTipText("Unedit selection");
uneditButton.addActionListener(this);
- commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
allParamsButton.setToolTipText("Edit all params");
allParamsButton.addActionListener(this);
- commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
clearPanelButton.setToolTipText("Clear edit panel");
clearPanelButton.addActionListener(this);
- commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
unselectButton.setToolTipText("Unselect");
unselectButton.addActionListener(this);
- commandsPanel.preferredHeight = 1;
+ editCommandsPanel.preferredHeight = 1;
- oe.treePanel.add(commandsPanel);
- oe.treePanel.Return();
+// oe.treePanel.add(commandsPanel);
+// oe.treePanel.Return();
// oe.aConstraints.gridx += 1;
// oe.aConstraints.weighty = 0;
@@ -1454,6 +1451,7 @@
shadow.material = new cMaterial(obj.material);
shadow.material.diffuse = 0.0001f;
shadow.material.specular = 0.0001f;
+ //shadow.projectedVertices[1].x = 300;
makeSomething(shadow);
}
diff --git a/ObjEditor.java b/ObjEditor.java
index 9be4ae9..9fcd4b1 100644
--- a/ObjEditor.java
+++ b/ObjEditor.java
@@ -171,7 +171,7 @@
objEditor.ctrlPanel.remove(setupPanel);
objEditor.ctrlPanel.remove(setupPanel2);
- objEditor.ctrlPanel.remove(commandsPanel);
+ objEditor.ctrlPanel.remove(objectCommandsPanel);
objEditor.ctrlPanel.remove(pushPanel);
//objEditor.ctrlPanel.remove(fillPanel);
@@ -327,9 +327,18 @@
toolbarPanel.setName("Toolbar");
treePanel = new cGridBag();
treePanel.setName("Tree");
+
+ editPanel = new cGridBag().setVertical(true);
+ editPanel.setName("Edit");
+
ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout());
- ctrlPanel.setName("Edit");
+
+ editCommandsPanel = new cGridBag();
+ editPanel.add(editCommandsPanel);
+ editPanel.add(ctrlPanel);
+
materialPanel = new cGridBag().setVertical(true);
+
materialPanel.setName("Material");
/*JTextPane*/
infoarea = createTextPane();
@@ -819,10 +828,13 @@
JButton fasterButton;
JButton remarkButton;
+ cGridBag editPanel;
+ cGridBag editCommandsPanel;
+
cGridBag namePanel;
cGridBag setupPanel;
cGridBag setupPanel2;
- cGridBag commandsPanel;
+ cGridBag objectCommandsPanel;
cGridBag pushPanel;
cGridBag fillPanel;
@@ -1035,23 +1047,23 @@
oe.ctrlPanel.add(setupPanel2);
oe.ctrlPanel.Return();
- commandsPanel = new cGridBag().setVertical(false);
+ objectCommandsPanel = new cGridBag().setVertical(false);
- resetButton = AddButton(commandsPanel, "Reset");
+ resetButton = AddButton(objectCommandsPanel, "Reset");
resetButton.setToolTipText("Jump to frame zero");
- stepButton = AddButton(commandsPanel, "Step");
+ stepButton = AddButton(objectCommandsPanel, "Step");
stepButton.setToolTipText("Step one frame");
// resetAllButton = AddButton(oe, "Reset All");
// stepAllButton = AddButton(oe, "Step All");
// Return();
- slowerButton = AddButton(commandsPanel, "Slow");
+ slowerButton = AddButton(objectCommandsPanel, "Slow");
slowerButton.setToolTipText("Decrease animation speed");
- fasterButton = AddButton(commandsPanel, "Fast");
+ fasterButton = AddButton(objectCommandsPanel, "Fast");
fasterButton.setToolTipText("Increase animation speed");
- remarkButton = AddButton(commandsPanel, "Remark");
+ remarkButton = AddButton(objectCommandsPanel, "Remark");
remarkButton.setToolTipText("Set the current transform as the target");
- oe.ctrlPanel.add(commandsPanel);
+ oe.ctrlPanel.add(objectCommandsPanel);
oe.ctrlPanel.Return();
pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons
@@ -1340,7 +1352,7 @@
// north.setName("Edit");
// north.add(ctrlPanel, BorderLayout.NORTH);
// objectPanel.add(north);
- objectPanel.add(ctrlPanel);
+ objectPanel.add(editPanel);
objectPanel.add(infoPanel);
/*
--
Gitblit v1.6.2