trackeditor: show option to change graphic file extension to match export type

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9480 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: ff783e6ae1d7075403844631776f8d1e099faf87
Former-commit-id: 2c9ed4b8e1dd881d583d29e59985276fb61192a8
This commit is contained in:
iobyte 2024-07-13 15:15:25 +00:00
parent a619a69a9a
commit 71b57e502c
3 changed files with 18 additions and 4 deletions

View file

@ -2463,12 +2463,26 @@ public class EditorFrame extends JFrame
{
if (graphicObjects.get(i).getName().equals(graphicObjects.get(j).getName()))
{
JOptionPane.showMessageDialog(this, "Graphic Objects has duplicate name: " + graphicObjects.get(i).getName(), "Exporting AC3", JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(this, "Graphic Objects has duplicate name: " + graphicObjects.get(i).getName(), "Exporting AC" + (acc ? "C" : ""), JOptionPane.ERROR_MESSAGE);
return;
}
}
}
if (acc && getTrackData().getGraphic().getDescription().endsWith(".ac"))
{
if (JOptionPane.showConfirmDialog(this, "Change graphics file type to acc?", "Exporting ACC", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)
{
getTrackData().getGraphic().setDescription(getTrackData().getGraphic().getDescription() + "c");
}
}
else if (!acc && getTrackData().getGraphic().getDescription().endsWith(".acc"))
{
if (JOptionPane.showConfirmDialog(this, "Change graphics file type to ac?", "Exporting AC", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)
{
getTrackData().getGraphic().setDescription(getTrackData().getGraphic().getDescription().substring(0, getTrackData().getGraphic().getDescription().length() - 1));
}
}
String reliefBorder = getTrackData().getGraphic().getTerrainGeneration().getReliefBorder();
String newArgs = additionalArgs;
if (reliefBorder != null && reliefBorder.equals("yes"))

View file

@ -251,7 +251,7 @@ public class TrackgenPanel extends JDialog implements Runnable
}
} catch (IOException e1)
{
JOptionPane.showMessageDialog(this, e1.getLocalizedMessage(), "Export AC3D", JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(this, e1.getLocalizedMessage(), "Export ac" + (acc ? "c" : ""), JOptionPane.ERROR_MESSAGE);
}
this.waitLabel.setText("Track finished");
}
@ -283,7 +283,7 @@ public class TrackgenPanel extends JDialog implements Runnable
trackgenLabel.setText("Track data");
trackgenLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 18));
waitLabel.setBounds(10, 412, 290, 25);
waitLabel.setText("Constructing the .ac file. Please wait...");
waitLabel.setText("Constructing the .ac" + (acc ? "c" : "") + " file. Please wait...");
panel.add(trackgenLabel, null);
panel.add(waitLabel, null);

View file

@ -34,7 +34,7 @@ public class Properties
private static Properties instance = new Properties();
private Vector<ActionListener> propertiesListeners = new Vector<ActionListener>();
public final String title = "sd2-trackeditor";
public final String version = "1.5.1";
public final String version = "1.5.2";
private String path;
private double imageScale = 1;