.. | .. |
---|
75 | 75 | return new cCheckBox(icon, border); |
---|
76 | 76 | } |
---|
77 | 77 | |
---|
| 78 | + static java.util.Hashtable<String, javax.swing.ImageIcon> icons = new java.util.Hashtable<String, javax.swing.ImageIcon>(); |
---|
| 79 | + |
---|
78 | 80 | ImageIcon GetIcon(String name) |
---|
79 | 81 | { |
---|
| 82 | + javax.swing.ImageIcon iconCache = icons.get(name); |
---|
| 83 | + if (iconCache != null) |
---|
| 84 | + { |
---|
| 85 | + return iconCache; |
---|
| 86 | + } |
---|
| 87 | + |
---|
80 | 88 | try |
---|
81 | 89 | { |
---|
82 | 90 | BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
.. | .. |
---|
94 | 102 | // } |
---|
95 | 103 | |
---|
96 | 104 | javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image); |
---|
| 105 | + |
---|
| 106 | + icons.put(name, icon); |
---|
| 107 | + |
---|
97 | 108 | return icon; |
---|
98 | 109 | } |
---|
99 | 110 | catch (Exception e) |
---|
100 | 111 | { |
---|
| 112 | + //icons.put(name, null); |
---|
101 | 113 | return null; |
---|
102 | 114 | } |
---|
103 | 115 | } |
---|
.. | .. |
---|
433 | 445 | |
---|
434 | 446 | ChangeListener changeListener = new ChangeListener() |
---|
435 | 447 | { |
---|
436 | | - String name; |
---|
| 448 | + //String name; |
---|
437 | 449 | |
---|
438 | 450 | public void stateChanged(ChangeEvent changeEvent) |
---|
439 | 451 | { |
---|
.. | .. |
---|
453 | 465 | // EditSelection(false); |
---|
454 | 466 | // } |
---|
455 | 467 | |
---|
456 | | - if (objectPanel.getSelectedIndex() == 4) |
---|
457 | | - { |
---|
458 | | - name = copy.skyboxname; |
---|
459 | | - |
---|
460 | | - if (name == null) |
---|
461 | | - { |
---|
462 | | - name = ""; |
---|
463 | | - } |
---|
464 | | - |
---|
465 | | - copy.skyboxname = "cubemaps/default-skyboxes/rgb"; |
---|
466 | | - copy.skyboxext = "jpg"; |
---|
467 | | - } |
---|
468 | | - else |
---|
469 | | - { |
---|
470 | | - if (name != null) |
---|
471 | | - { |
---|
472 | | - if (name.equals("")) |
---|
473 | | - { |
---|
474 | | - copy.skyboxname = null; |
---|
475 | | - copy.skyboxext = null; |
---|
476 | | - } |
---|
477 | | - else |
---|
478 | | - { |
---|
479 | | - copy.skyboxname = name; |
---|
480 | | - } |
---|
481 | | - } |
---|
482 | | - } |
---|
| 468 | +// if (objectPanel.getSelectedIndex() == 4) |
---|
| 469 | +// { |
---|
| 470 | +// name = copy.skyboxname; |
---|
| 471 | +// |
---|
| 472 | +// if (name == null) |
---|
| 473 | +// { |
---|
| 474 | +// name = ""; |
---|
| 475 | +// } |
---|
| 476 | +// |
---|
| 477 | +// copy.skyboxname = "cubemaps/default-skyboxes/rgb"; |
---|
| 478 | +// copy.skyboxext = "jpg"; |
---|
| 479 | +// } |
---|
| 480 | +// else |
---|
| 481 | +// { |
---|
| 482 | +// if (name != null) |
---|
| 483 | +// { |
---|
| 484 | +// if (name.equals("")) |
---|
| 485 | +// { |
---|
| 486 | +// copy.skyboxname = null; |
---|
| 487 | +// copy.skyboxext = null; |
---|
| 488 | +// } |
---|
| 489 | +// else |
---|
| 490 | +// { |
---|
| 491 | +// copy.skyboxname = name; |
---|
| 492 | +// } |
---|
| 493 | +// } |
---|
| 494 | +// } |
---|
| 495 | + cameraView.transformMode = objectPanel.getSelectedIndex() == 4; |
---|
483 | 496 | |
---|
484 | 497 | // refreshContents(false); // To refresh Info tab |
---|
485 | 498 | cameraView.repaint(); |
---|
.. | .. |
---|
1676 | 1689 | scenePanel.add(tabbedPane); |
---|
1677 | 1690 | |
---|
1678 | 1691 | //if (Globals.ADVANCED) |
---|
1679 | | - tabbedPane.add(infoPanel); |
---|
1680 | | - tabbedPane.setIconAt(3, GetIcon("icons/info.png")); |
---|
1681 | | - tabbedPane.setToolTipTextAt(3, "Information"); |
---|
| 1692 | +// tabbedPane.add(infoPanel); |
---|
| 1693 | +// tabbedPane.setIconAt(3, GetIcon("icons/info.png")); |
---|
| 1694 | +// tabbedPane.setToolTipTextAt(3, "Information"); |
---|
1682 | 1695 | |
---|
1683 | 1696 | /* |
---|
1684 | 1697 | cTree jTree = new cTree(null); |
---|
.. | .. |
---|
1776 | 1789 | |
---|
1777 | 1790 | frame.getContentPane().setLayout(new BorderLayout()); |
---|
1778 | 1791 | /**/ |
---|
1779 | | - JTabbedPane worldPane = new JTabbedPane(); |
---|
| 1792 | + //JTabbedPane worldPane = new JTabbedPane(); |
---|
1780 | 1793 | //worldPane.add(bigPanel); |
---|
1781 | 1794 | //worldPane.add(worldPanel); |
---|
1782 | 1795 | /**/ |
---|
.. | .. |
---|
4781 | 4794 | if (muteSlider) |
---|
4782 | 4795 | return; |
---|
4783 | 4796 | |
---|
| 4797 | + Replace(); |
---|
| 4798 | + |
---|
4784 | 4799 | int version = versionSlider.getInteger(); |
---|
4785 | 4800 | |
---|
4786 | 4801 | if (version != -1 && copy.versionlist[version] != null) |
---|
.. | .. |
---|
5535 | 5550 | copy.versionlist = new Object3D[100]; |
---|
5536 | 5551 | copy.versionindex = -1; |
---|
5537 | 5552 | |
---|
5538 | | - Save(true); |
---|
| 5553 | + //Save(true); |
---|
5539 | 5554 | } |
---|
5540 | 5555 | |
---|
5541 | 5556 | //? SetUndoStates(); |
---|