.. | .. |
---|
31 | 31 | boolean timeline; |
---|
32 | 32 | boolean wasFullScreen; |
---|
33 | 33 | |
---|
| 34 | + GroupEditor callee; |
---|
| 35 | + JFrame frame; |
---|
| 36 | + |
---|
34 | 37 | // SCRIPT |
---|
35 | 38 | |
---|
36 | 39 | transient JFrame textpanel = null; |
---|
.. | .. |
---|
121 | 124 | void keyPressed(int key, int modifiers) |
---|
122 | 125 | { |
---|
123 | 126 | System.out.println("KEY PRESSED"); |
---|
124 | | - CameraPane.theRenderer.keyPressed(key, modifiers); |
---|
| 127 | + Globals.theRenderer.keyPressed(key, modifiers); |
---|
125 | 128 | } |
---|
126 | 129 | */ |
---|
127 | 130 | |
---|
128 | 131 | static GridBagConstraints aConstraints; |
---|
129 | 132 | static GridBagConstraints aWindowConstraints; |
---|
130 | | - GroupEditor callee; |
---|
131 | | - JFrame frame; |
---|
| 133 | + |
---|
132 | 134 | static int GRIDWIDTH = 100; // 4; |
---|
133 | 135 | |
---|
134 | 136 | public void closeUI() |
---|
.. | .. |
---|
309 | 311 | toggleTextureItem.setState(CameraPane.textureon); |
---|
310 | 312 | cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
311 | 313 | toggleLiveItem.addItemListener(this); |
---|
312 | | - toggleLiveItem.setState(CameraPane.isLIVE()); |
---|
| 314 | + toggleLiveItem.setState(Globals.isLIVE()); |
---|
313 | 315 | cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
314 | 316 | stepItem.addActionListener(this); |
---|
315 | 317 | // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
.. | .. |
---|
1189 | 1191 | timelinePanel = new JPanel(new BorderLayout()); |
---|
1190 | 1192 | timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
1191 | 1193 | |
---|
| 1194 | + cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel); |
---|
| 1195 | + cameraPanel.setContinuousLayout(true); |
---|
| 1196 | + cameraPanel.setOneTouchExpandable(true); |
---|
| 1197 | +// cameraPanel.setDividerLocation(0.9); |
---|
| 1198 | +// cameraPanel.setDividerSize(9); |
---|
| 1199 | + cameraPanel.setResizeWeight(1.0); |
---|
| 1200 | + |
---|
1192 | 1201 | centralPanel.add(cameraView); |
---|
1193 | 1202 | //frame.setJMenuBar(timelineMenubar); |
---|
1194 | 1203 | //centralPanel.add(timelinePanel); |
---|
.. | .. |
---|
1283 | 1292 | optionsPanel = new JPanel(new GridBagLayout()); |
---|
1284 | 1293 | |
---|
1285 | 1294 | optionsPanel.setName("Options"); |
---|
| 1295 | + |
---|
| 1296 | + AddOptions(optionsPanel, aConstraints); |
---|
| 1297 | + |
---|
1286 | 1298 | scenePanel.add(optionsPanel); |
---|
1287 | 1299 | |
---|
1288 | 1300 | |
---|
.. | .. |
---|
1362 | 1374 | //worldPane.add(bigPanel); |
---|
1363 | 1375 | //worldPane.add(worldPanel); |
---|
1364 | 1376 | /**/ |
---|
1365 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 1377 | + //frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 1378 | + frame.add(/*"Center",*/framePanel); |
---|
1366 | 1379 | //frame.getContentPane().add(/*"Center",*/ worldPane); |
---|
1367 | 1380 | |
---|
1368 | 1381 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
.. | .. |
---|
1383 | 1396 | }); |
---|
1384 | 1397 | } |
---|
1385 | 1398 | |
---|
| 1399 | + void AddOptions(JPanel panel, GridBagConstraints constraints) |
---|
| 1400 | + { |
---|
| 1401 | + } |
---|
| 1402 | + |
---|
1386 | 1403 | JTree GetTree() |
---|
1387 | 1404 | { |
---|
1388 | 1405 | return objEditor.jTree; |
---|
.. | .. |
---|
2996 | 3013 | if (timeline) |
---|
2997 | 3014 | { |
---|
2998 | 3015 | centralPanel.remove(cameraView); |
---|
2999 | | - centralPanel.add(timelinePanel); |
---|
| 3016 | + cameraPanel.add(cameraView); |
---|
| 3017 | + centralPanel.add(cameraPanel); |
---|
3000 | 3018 | frame.setJMenuBar(timelineMenubar); |
---|
3001 | 3019 | wasFullScreen = CameraPane.FULLSCREEN; |
---|
3002 | 3020 | if (!CameraPane.FULLSCREEN) |
---|
.. | .. |
---|
3005 | 3023 | } |
---|
3006 | 3024 | else |
---|
3007 | 3025 | { |
---|
3008 | | - centralPanel.remove(timelinePanel); |
---|
| 3026 | + centralPanel.remove(cameraPanel); |
---|
3009 | 3027 | centralPanel.add(cameraView); |
---|
3010 | 3028 | frame.setJMenuBar(null); |
---|
3011 | 3029 | if (!wasFullScreen) |
---|
.. | .. |
---|
3128 | 3146 | objEditor.refreshContents(); |
---|
3129 | 3147 | } else if (event.getSource() == stepItem) |
---|
3130 | 3148 | { |
---|
3131 | | - cameraView.ONESTEP = true; |
---|
| 3149 | + //cameraView.ONESTEP = true; |
---|
| 3150 | + Globals.ONESTEP = true; |
---|
3132 | 3151 | cameraView.repaint(); |
---|
3133 | 3152 | return; |
---|
3134 | 3153 | } else if (event.getSource() == stepButton) |
---|
.. | .. |
---|
3285 | 3304 | |
---|
3286 | 3305 | void ToggleAnimation() |
---|
3287 | 3306 | { |
---|
3288 | | - if (!CameraPane.ANIMATION) |
---|
| 3307 | + if (!Globals.ANIMATION) |
---|
3289 | 3308 | { |
---|
3290 | 3309 | FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
---|
3291 | 3310 | browser.show(); |
---|
3292 | 3311 | String filename = browser.getFile(); |
---|
3293 | 3312 | if (filename != null && filename.length() > 0) |
---|
3294 | 3313 | { |
---|
3295 | | - CameraPane.filename = browser.getDirectory() + filename; |
---|
| 3314 | + Globals.filename = browser.getDirectory() + filename; |
---|
3296 | 3315 | //CameraPane.framecount = 0; |
---|
3297 | | - CameraPane.imagecount = 0; |
---|
| 3316 | + Globals.imagecount = 0; |
---|
3298 | 3317 | |
---|
3299 | | - CameraPane.ANIMATION ^= true; |
---|
| 3318 | + Globals.ANIMATION ^= true; |
---|
3300 | 3319 | |
---|
3301 | 3320 | GrafreeD.wav.cursor = 0; |
---|
3302 | 3321 | GrafreeD.wav.loop = 0; |
---|
3303 | 3322 | } |
---|
3304 | 3323 | } else |
---|
3305 | 3324 | { |
---|
3306 | | - CameraPane.ANIMATION ^= true; |
---|
| 3325 | + Globals.ANIMATION ^= true; |
---|
3307 | 3326 | } |
---|
3308 | 3327 | } |
---|
3309 | 3328 | |
---|
.. | .. |
---|
4533 | 4552 | JPanel bigThree; |
---|
4534 | 4553 | JTabbedPane scenePanel; |
---|
4535 | 4554 | JPanel centralPanel; |
---|
| 4555 | + JSplitPane cameraPanel; |
---|
4536 | 4556 | JPanel timelinePanel; |
---|
4537 | 4557 | JMenuBar timelineMenubar; |
---|
4538 | 4558 | JSplitPane framePanel; |
---|