.. | .. |
---|
2370 | 2370 | { |
---|
2371 | 2371 | public void mouseClicked(MouseEvent e) |
---|
2372 | 2372 | { |
---|
2373 | | - borderfadeField.setFloat(0.5); |
---|
| 2373 | + borderfadeField.setFloat(0.4); |
---|
2374 | 2374 | opacityField.setFloat(0.75); |
---|
2375 | 2375 | |
---|
2376 | 2376 | materialtouched = true; |
---|
.. | .. |
---|
2436 | 2436 | } |
---|
2437 | 2437 | }); |
---|
2438 | 2438 | presetpanel.add(shadowShader); |
---|
| 2439 | + |
---|
| 2440 | + cLabel para0 = GetLabel("icons/shadericons/parallax0.png", !Globals.NIMBUSLAF); |
---|
| 2441 | + para0.setToolTipText("No parallax"); |
---|
| 2442 | + para0.addMouseListener(new MouseAdapter() |
---|
| 2443 | + { |
---|
| 2444 | + public void mouseClicked(MouseEvent e) |
---|
| 2445 | + { |
---|
| 2446 | + parallaxField.setFloat(0.125); |
---|
| 2447 | + |
---|
| 2448 | + materialtouched = true; |
---|
| 2449 | + applySelf(); |
---|
| 2450 | + } |
---|
| 2451 | + }); |
---|
| 2452 | + presetpanel.add(para0); |
---|
| 2453 | + |
---|
| 2454 | + cLabel para1 = GetLabel("icons/shadericons/parallax1.png", !Globals.NIMBUSLAF); |
---|
| 2455 | + para1.setToolTipText("With parallax"); |
---|
| 2456 | + para1.addMouseListener(new MouseAdapter() |
---|
| 2457 | + { |
---|
| 2458 | + public void mouseClicked(MouseEvent e) |
---|
| 2459 | + { |
---|
| 2460 | + parallaxField.setFloat(0.13); |
---|
| 2461 | + |
---|
| 2462 | + materialtouched = true; |
---|
| 2463 | + applySelf(); |
---|
| 2464 | + } |
---|
| 2465 | + }); |
---|
| 2466 | + presetpanel.add(para1); |
---|
| 2467 | + |
---|
| 2468 | + cLabel para2 = GetLabel("icons/shadericons/parallax2.png", !Globals.NIMBUSLAF); |
---|
| 2469 | + para2.setToolTipText("Reset parallax"); |
---|
| 2470 | + para2.addMouseListener(new MouseAdapter() |
---|
| 2471 | + { |
---|
| 2472 | + public void mouseClicked(MouseEvent e) |
---|
| 2473 | + { |
---|
| 2474 | + parallaxField.setFloat(0.14); |
---|
| 2475 | + |
---|
| 2476 | + materialtouched = true; |
---|
| 2477 | + applySelf(); |
---|
| 2478 | + } |
---|
| 2479 | + }); |
---|
| 2480 | + presetpanel.add(para2); |
---|
2439 | 2481 | |
---|
2440 | 2482 | cGridBag panel = new cGridBag().setVertical(true); |
---|
2441 | 2483 | |
---|
.. | .. |
---|
2682 | 2724 | backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
2683 | 2725 | colorSection.add(backlit); |
---|
2684 | 2726 | |
---|
| 2727 | + cGridBag parallax = new cGridBag(); |
---|
| 2728 | + parallax.add(parallaxLabel = new JLabel("Parallax")); // , aConstraints); |
---|
| 2729 | + parallaxLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 2730 | + parallax.add(parallaxField = new cNumberSlider(this, 0.001, 0.25, -0.125)); // , aConstraints); |
---|
| 2731 | + colorSection.add(parallax); |
---|
| 2732 | + |
---|
2685 | 2733 | //panel.add(new JSeparator()); |
---|
2686 | 2734 | |
---|
2687 | 2735 | //panel.add(globalSection); |
---|
.. | .. |
---|
3733 | 3781 | shadowField.setFloat(mat.shadow); |
---|
3734 | 3782 | textureField.setFloat(mat.texture); |
---|
3735 | 3783 | opacityField.setFloat(mat.opacity); |
---|
| 3784 | + parallaxField.setFloat(mat.parallax + 0.125f); |
---|
3736 | 3785 | fakedepthField.setFloat(mat.fakedepth); |
---|
3737 | 3786 | shadowbiasField.setFloat(mat.shadowbias); |
---|
3738 | 3787 | bumpField.setInteger(1); // dec 2013 |
---|
.. | .. |
---|
4957 | 5006 | current.shadow = (float) shadowField.getFloat(); |
---|
4958 | 5007 | current.texture = (float) textureField.getFloat(); |
---|
4959 | 5008 | current.opacity = (float) opacityField.getFloat(); |
---|
| 5009 | + current.parallax = (float) parallaxField.getFloat() - 0.125f; |
---|
4960 | 5010 | current.fakedepth = (float) fakedepthField.getFloat(); |
---|
4961 | 5011 | current.shadowbias = (float) shadowbiasField.getFloat(); |
---|
4962 | 5012 | |
---|
.. | .. |
---|
5011 | 5061 | textureField.SetToolTipValue((mat.texture)); |
---|
5012 | 5062 | if (!Equal(opacityField.getFloat(), mat.opacity)) |
---|
5013 | 5063 | opacityField.SetToolTipValue((mat.opacity)); |
---|
| 5064 | + //if (!Equal(parallaxField.getFloat(), mat.parallax)) |
---|
| 5065 | + parallaxField.SetToolTipValue((mat.parallax)); |
---|
5014 | 5066 | if (!Equal(fakedepthField.getFloat(), mat.fakedepth)) |
---|
5015 | 5067 | fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
5016 | 5068 | if (!Equal(shadowbiasField.getFloat(), mat.shadowbias)) |
---|
.. | .. |
---|
6267 | 6319 | cNumberSlider textureField; |
---|
6268 | 6320 | JLabel opacityLabel; |
---|
6269 | 6321 | cNumberSlider opacityField; |
---|
| 6322 | + JLabel parallaxLabel; |
---|
| 6323 | + cNumberSlider parallaxField; |
---|
6270 | 6324 | JLabel fakedepthLabel; |
---|
6271 | 6325 | cNumberSlider fakedepthField; |
---|
6272 | 6326 | JLabel shadowbiasLabel; |
---|