.. | .. |
---|
16 | 16 | //import buoy.widget.BFileChooser; |
---|
17 | 17 | |
---|
18 | 18 | class GroupEditor extends ObjEditor implements //iParse, //iCallBack, |
---|
| 19 | + Grafreed.iResourceCallBack, |
---|
19 | 20 | ObjectUI, |
---|
20 | 21 | Runnable, |
---|
21 | 22 | ActionListener, |
---|
.. | .. |
---|
311 | 312 | } |
---|
312 | 313 | } |
---|
313 | 314 | |
---|
314 | | - public void ChangeSkybox(String name) |
---|
| 315 | + public void CallBack(String[] path) |
---|
| 316 | + { |
---|
| 317 | + for (int i = 0; i < path.length; i++) |
---|
| 318 | + { |
---|
| 319 | + System.out.print(path[i] + "/"); |
---|
| 320 | + } |
---|
| 321 | + |
---|
| 322 | + System.out.println(); |
---|
| 323 | + } |
---|
| 324 | + |
---|
| 325 | + public void ChangeSkybox(String skybox) |
---|
315 | 326 | { |
---|
316 | 327 | //cameraView.envyoff = false; |
---|
317 | | - group.skyboxname = name; |
---|
| 328 | + group.skyboxname = skybox; |
---|
318 | 329 | group.skyboxext = "jpg"; |
---|
319 | 330 | cameraView.repaint(); |
---|
| 331 | + |
---|
| 332 | + Grafreed.ParseResources("textures", this); |
---|
320 | 333 | } |
---|
321 | 334 | |
---|
322 | 335 | //ObjEditor objEditor; |
---|
.. | .. |
---|
931 | 944 | restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
932 | 945 | restoreCameraButton.addActionListener(this); |
---|
933 | 946 | |
---|
934 | | - copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
935 | | - saveButton.setToolTipText("Duplicate current version"); |
---|
936 | | - saveButton.addActionListener(this); |
---|
| 947 | + copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 948 | + saveVersionButton.setToolTipText("Duplicate current version"); |
---|
| 949 | + saveVersionButton.addActionListener(this); |
---|
937 | 950 | |
---|
938 | | - copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
939 | | - undoButton.setToolTipText("Previous version"); |
---|
940 | | - undoButton.addActionListener(this); |
---|
941 | | - undoButton.setEnabled(false); |
---|
| 951 | + copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 952 | + deleteVersionButton.setToolTipText("Delete current version"); |
---|
| 953 | + deleteVersionButton.addActionListener(this); |
---|
| 954 | + |
---|
| 955 | + copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 956 | + previousVersionButton.setToolTipText("Previous version"); |
---|
| 957 | + previousVersionButton.addActionListener(this); |
---|
| 958 | + previousVersionButton.setEnabled(false); |
---|
942 | 959 | |
---|
943 | 960 | cGridBag updown = new cGridBag().setVertical(true); |
---|
944 | 961 | updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
945 | 962 | restoreButton.setToolTipText("Undo (restore current version)"); |
---|
946 | 963 | restoreButton.addActionListener(this); |
---|
947 | | - restoreButton.setEnabled(false); |
---|
| 964 | + //restoreButton.setEnabled(false); |
---|
948 | 965 | |
---|
949 | 966 | updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
950 | 967 | replaceButton.setToolTipText("Save (replace current version)"); |
---|
951 | 968 | replaceButton.addActionListener(this); |
---|
952 | | - replaceButton.setEnabled(false); |
---|
| 969 | + //replaceButton.setEnabled(false); |
---|
953 | 970 | |
---|
954 | 971 | copyOptionsPanel.add(updown); |
---|
955 | 972 | |
---|
956 | | - copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
957 | | - redoButton.setToolTipText("Next version"); |
---|
958 | | - redoButton.addActionListener(this); |
---|
959 | | - redoButton.setEnabled(false); |
---|
| 973 | + copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 974 | + nextVersionButton.setToolTipText("Next version"); |
---|
| 975 | + nextVersionButton.addActionListener(this); |
---|
| 976 | + nextVersionButton.setEnabled(false); |
---|
960 | 977 | |
---|
961 | 978 | oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
962 | 979 | liveCB.setToolTipText("Enable animation"); |
---|
.. | .. |
---|
2571 | 2588 | if (source == invariantsItem) |
---|
2572 | 2589 | { |
---|
2573 | 2590 | System.out.println("Invariants:"); |
---|
2574 | | - Grafreed.grafreeD.universe.invariants(); |
---|
| 2591 | + Grafreed.grafreed.universe.invariants(); |
---|
2575 | 2592 | } else |
---|
2576 | 2593 | if (source == memoryItem) |
---|
2577 | 2594 | { |
---|
.. | .. |
---|
2602 | 2619 | { |
---|
2603 | 2620 | ToggleFullScreen(); |
---|
2604 | 2621 | } else |
---|
2605 | | - if (source == undoButton) |
---|
| 2622 | + if (source == previousVersionButton) |
---|
2606 | 2623 | { |
---|
2607 | 2624 | // Go to previous version |
---|
2608 | 2625 | //if (!Undo()) |
---|
2609 | 2626 | //java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2610 | | - Undo(); |
---|
| 2627 | + PreviousVersion(); |
---|
2611 | 2628 | } else |
---|
2612 | 2629 | if (source == restoreButton) |
---|
2613 | 2630 | { |
---|
2614 | 2631 | // Restore current version |
---|
2615 | 2632 | Restore(); |
---|
2616 | | - restoreButton.setEnabled(false); |
---|
| 2633 | + //restoreButton.setEnabled(false); |
---|
2617 | 2634 | } else |
---|
2618 | 2635 | if (source == replaceButton) |
---|
2619 | 2636 | { |
---|
2620 | 2637 | // Overwrite current version |
---|
2621 | 2638 | Replace(); |
---|
2622 | | - replaceButton.setEnabled(false); |
---|
| 2639 | + //replaceButton.setEnabled(false); |
---|
2623 | 2640 | } else |
---|
2624 | | - if (source == redoButton) |
---|
| 2641 | + if (source == nextVersionButton) |
---|
2625 | 2642 | { |
---|
2626 | 2643 | // Go to next version |
---|
2627 | | - Redo(); |
---|
| 2644 | + NextVersion(); |
---|
2628 | 2645 | } else |
---|
2629 | | - if (source == saveButton) |
---|
| 2646 | + if (source == saveVersionButton) |
---|
2630 | 2647 | { |
---|
2631 | 2648 | // Save a new version |
---|
2632 | 2649 | if (!Save(true)) |
---|
2633 | 2650 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 2651 | + } else |
---|
| 2652 | + if (source == deleteVersionButton) |
---|
| 2653 | + { |
---|
| 2654 | + // Delete a new version |
---|
| 2655 | + DeleteVersion(); |
---|
2634 | 2656 | } else |
---|
2635 | 2657 | if (source == oneStepButton) |
---|
2636 | 2658 | { |
---|
.. | .. |
---|
2685 | 2707 | } else |
---|
2686 | 2708 | if (source == undoItem) |
---|
2687 | 2709 | { |
---|
2688 | | - Undo(); |
---|
| 2710 | + PreviousVersion(); |
---|
2689 | 2711 | } else |
---|
2690 | 2712 | if (source == redoItem) |
---|
2691 | 2713 | { |
---|
2692 | | - Redo(); |
---|
| 2714 | + NextVersion(); |
---|
2693 | 2715 | } else |
---|
2694 | 2716 | if (source == duplicateItem) |
---|
2695 | 2717 | { |
---|
.. | .. |
---|
6004 | 6026 | |
---|
6005 | 6027 | cButton restoreCameraButton; |
---|
6006 | 6028 | |
---|
6007 | | - cButton saveButton; |
---|
6008 | 6029 | cButton oneStepButton; |
---|
6009 | 6030 | |
---|
6010 | 6031 | cButton groupButton; |
---|