···247247 int choice = JOptionPane.OK_OPTION;
248248249249 if (taskRunning)
250250- choice = SwingUtils.showFramedConfirmDialog(null, String.format(
251251- "A task is still running. %nAre you sure you want to exit?"),
252252- "Task Still Running", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
250250+ choice = SwingUtils.getConfirmDialog()
251251+ .setTitle("Task Still Running")
252252+ .setMessage("A task is still running.", "Are you sure you want to exit?")
253253+ .setMessageType(JOptionPane.WARNING_MESSAGE)
254254+ .setOptionsType(JOptionPane.YES_NO_OPTION)
255255+ .choose();
253256254257 if (choice == JOptionPane.OK_OPTION) {
255258 dispose();
···387390 {
388391 new EditorWorker(() -> {
389392 if (!Environment.projectConfig.getBoolean(Options.ExtractedMapData)) {
390390- int result = SwingUtils.showFramedConfirmDialog(null,
391391- "This action will modify the source files of almost every map.\n"
392392- + "Consider creating a backup or committing any changes before proceeding.\n"
393393- + "Are you ready to begin extracting?",
394394- "Extraction Warning",
395395- JOptionPane.YES_NO_CANCEL_OPTION,
396396- JOptionPane.WARNING_MESSAGE);
393393+ int choice = SwingUtils.getConfirmDialog()
394394+ .setTitle("Extraction Warning")
395395+ .setMessage("This action will modify the source files of almost every map.",
396396+ "Consider creating a backup or committing any changes before proceeding.",
397397+ "Are you ready to begin extracting?")
398398+ .setMessageType(JOptionPane.WARNING_MESSAGE)
399399+ .setOptionsType(JOptionPane.YES_NO_CANCEL_OPTION)
400400+ .choose();
397401398398- if (result == JOptionPane.YES_OPTION) {
402402+ if (choice == JOptionPane.YES_OPTION) {
399403 Logger.log("Extracting map data...", Priority.MILESTONE);
400404 Extractor.extractAll();
401405402402- SwingUtils.showFramedMessageDialog(null,
403403- "Complete!",
404404- "All Data Extracted",
405405- JOptionPane.PLAIN_MESSAGE);
406406+ SwingUtils.getMessageDialog()
407407+ .setTitle("All Data Extracted")
408408+ .setMessage("Complete!")
409409+ .setMessageType(JOptionPane.PLAIN_MESSAGE)
410410+ .show();
406411407412 Environment.projectConfig.setBoolean(Options.ExtractedMapData, true);
408413 Environment.projectConfig.saveConfigFile();
409414 }
410415 }
411416 else {
412412- SwingUtils.showFramedMessageDialog(null,
413413- "Map data has already been extracted for this project.",
414414- "Data Already Extracted",
415415- JOptionPane.WARNING_MESSAGE);
417417+ SwingUtils.getWarningDialog()
418418+ .setTitle("Data Already Extracted")
419419+ .setMessage("Map data has already been extracted for this project.")
420420+ .show();
416421 }
417422 });
418423 }
+204-111
src/main/java/app/SwingUtils.java
···1818import javax.swing.JComboBox;
1919import javax.swing.JComponent;
2020import javax.swing.JDialog;
2121-import javax.swing.JFileChooser;
2221import javax.swing.JFrame;
2322import javax.swing.JLabel;
2423import javax.swing.JOptionPane;
···7574 return dialogFrame;
7675 }
77767878- public static final int showFramedOpenDialog(JFileChooser chooser, Component parentComponent)
7777+ public static class OpenDialogCounter
7978 {
8080- JFrame dialogFrame = createDialogFrame(parentComponent, chooser.getDialogTitle());
8181- int choice = chooser.showOpenDialog(dialogFrame);
8282- dialogFrame.dispose();
8383- return choice;
7979+ private int count;
8080+8181+ public OpenDialogCounter()
8282+ {
8383+ count = 0;
8484+ }
8585+8686+ public void increment()
8787+ {
8888+ count++;
8989+ }
9090+9191+ public void decrement()
9292+ {
9393+ count--;
9494+ }
9595+9696+ public void reset()
9797+ {
9898+ count = 0;
9999+ }
100100+101101+ public boolean isZero()
102102+ {
103103+ return count == 0;
104104+ }
84105 }
851068686- public static final int showFramedSaveDialog(JFileChooser chooser, Component parentComponent)
107107+ private static enum DialogType
87108 {
8888- JFrame dialogFrame = createDialogFrame(parentComponent, chooser.getDialogTitle());
8989- int choice = chooser.showSaveDialog(dialogFrame);
9090- dialogFrame.dispose();
9191- return choice;
109109+ MESSAGE,
110110+ CONFIRM,
111111+ INPUT,
112112+ OPTION,
113113+ WARNING,
114114+ ERROR
92115 }
931169494- public static final void showFramedMessageDialog(
9595- Component parentComponent,
9696- Object message,
9797- String title,
9898- int messageType,
9999- Icon icon)
117117+ public static final DialogBuilder getMessageDialog()
100118 {
101101- JFrame dialogFrame = createDialogFrame(parentComponent, title);
102102- JOptionPane.showMessageDialog(dialogFrame, message, title, messageType, icon);
103103- dialogFrame.dispose();
119119+ return new DialogBuilder(DialogType.MESSAGE);
104120 }
105121106106- public static final void showFramedMessageDialog(
107107- Component parentComponent,
108108- Object message,
109109- String title,
110110- int messageType)
122122+ public static final DialogBuilder getConfirmDialog()
111123 {
112112- JFrame dialogFrame = createDialogFrame(parentComponent, title);
113113- JOptionPane.showMessageDialog(dialogFrame, message, title, messageType);
114114- dialogFrame.dispose();
124124+ return new DialogBuilder(DialogType.CONFIRM);
115125 }
116126117117- public static final void showFramedErrorMessage(
118118- Component parentComponent,
119119- Object message,
120120- String title)
127127+ public static final DialogBuilder getInputDialog()
121128 {
122122- showFramedMessageDialog(parentComponent, message,
123123- title, JOptionPane.ERROR_MESSAGE, Environment.ICON_ERROR);
129129+ return new DialogBuilder(DialogType.INPUT);
124130 }
125131126126- /*
127127- public static final void showFramedMessageDialog(
128128- Component parentComponent,
129129- Object message,
130130- String title)
132132+ public static final DialogBuilder getOptionDialog()
131133 {
132132- JFrame dialogFrame = createDiaglogFrame(parentComponent, title);
133133- JOptionPane.showMessageDialog(dialogFrame, message);
134134- dialogFrame.dispose();
134134+ return new DialogBuilder(DialogType.OPTION);
135135 }
136136- */
137136138138- public static final int showFramedOptionDialog(
139139- Component parentComponent,
140140- Object message,
141141- String title,
142142- int optionType,
143143- int messageType,
144144- Object[] options,
145145- Object initialValue)
137137+ public static final DialogBuilder getWarningDialog()
146138 {
147147- JFrame dialogFrame = createDialogFrame(parentComponent, title);
148148- int choice = JOptionPane.showOptionDialog(
149149- dialogFrame, message, title,
150150- optionType, messageType, null,
151151- options, initialValue);
152152- dialogFrame.dispose();
153153- return choice;
139139+ return new DialogBuilder(DialogType.WARNING);
154140 }
155141156156- public static final int showFramedOptionDialog(
157157- Component parentComponent,
158158- Object message,
159159- String title,
160160- int optionType,
161161- int messageType,
162162- Icon icon,
163163- Object[] options,
164164- Object initialValue)
142142+ public static final DialogBuilder getErrorDialog()
165143 {
166166- JFrame dialogFrame = createDialogFrame(parentComponent, title);
167167- int choice = JOptionPane.showOptionDialog(
168168- dialogFrame, message, title,
169169- optionType, messageType, icon,
170170- options, initialValue);
171171- dialogFrame.dispose();
172172- return choice;
144144+ return new DialogBuilder(DialogType.ERROR);
173145 }
174146175175- public static final int showFramedConfirmDialog(
176176- Component parentComponent,
177177- Object message,
178178- String title,
179179- int optionType,
180180- int messageType)
147147+ public static class DialogBuilder
181148 {
182182- JFrame dialogFrame = createDialogFrame(parentComponent, title);
183183- int choice = JOptionPane.showConfirmDialog(
184184- dialogFrame, message, title,
185185- optionType, messageType);
186186- dialogFrame.dispose();
187187- return choice;
188188- }
149149+ private final DialogType type;
150150+ private String title = "TITLE MISSING";
151151+ private Object message = "MESSAGE MISSING";
152152+ private int optionType;
153153+ private int messageType;
154154+ private Icon icon;
155155+ private Object[] options = null;
156156+ private Object initialValue = null;
157157+ private Component parentComponent = null;
158158+ private OpenDialogCounter counter = null;
159159+160160+ private DialogBuilder(DialogType type)
161161+ {
162162+ this.type = type;
163163+164164+ // set defaults
165165+ switch (type) {
166166+ case MESSAGE:
167167+ optionType = JOptionPane.DEFAULT_OPTION;
168168+ messageType = JOptionPane.INFORMATION_MESSAGE;
169169+ break;
170170+ case CONFIRM:
171171+ optionType = JOptionPane.YES_NO_CANCEL_OPTION;
172172+ messageType = JOptionPane.QUESTION_MESSAGE;
173173+ break;
174174+ case INPUT:
175175+ break;
176176+ case OPTION:
177177+ break;
178178+ case WARNING:
179179+ messageType = JOptionPane.WARNING_MESSAGE;
180180+ break;
181181+ case ERROR:
182182+ messageType = JOptionPane.ERROR_MESSAGE;
183183+ icon = Environment.ICON_ERROR;
184184+ break;
185185+ }
186186+ }
187187+188188+ public DialogBuilder setTitle(String title)
189189+ {
190190+ this.title = title;
191191+ return this;
192192+ }
193193+194194+ public DialogBuilder setMessage(Object message)
195195+ {
196196+ this.message = message;
197197+ return this;
198198+ }
199199+200200+ public DialogBuilder setMessage(String ... lines)
201201+ {
202202+ this.message = String.join(System.lineSeparator(), lines);
203203+ return this;
204204+ }
205205+206206+ public DialogBuilder setMessageType(int messageType)
207207+ {
208208+ this.messageType = messageType;
209209+ return this;
210210+ }
211211+212212+ public DialogBuilder setOptionsType(int optionType)
213213+ {
214214+ this.optionType = optionType;
215215+ return this;
216216+ }
217217+218218+ public DialogBuilder setIcon(Icon icon)
219219+ {
220220+ this.icon = icon;
221221+ return this;
222222+ }
223223+224224+ public DialogBuilder setOptions(String ... options)
225225+ {
226226+ this.options = options;
227227+ return this;
228228+ }
229229+230230+ public DialogBuilder setDefault(Object initialValue)
231231+ {
232232+ this.initialValue = initialValue;
233233+ return this;
234234+ }
235235+236236+ public DialogBuilder setParent(Component parentComponent)
237237+ {
238238+ this.parentComponent = parentComponent;
239239+ return this;
240240+ }
241241+242242+ public DialogBuilder setCounter(OpenDialogCounter counter)
243243+ {
244244+ this.counter = counter;
245245+ return this;
246246+ }
247247+248248+ public void show()
249249+ {
250250+ choose();
251251+ }
252252+253253+ public void showLater()
254254+ {
255255+ if (SwingUtilities.isEventDispatchThread()) {
256256+ choose();
257257+ }
258258+ else {
259259+ SwingUtilities.invokeLater(() -> {
260260+ choose();
261261+ });
262262+ }
263263+ }
189264190190- public static final int showFramedConfirmDialog(
191191- Component parentComponent,
192192- Object message,
193193- String title,
194194- int optionType)
195195- {
196196- JFrame dialogFrame = createDialogFrame(parentComponent, title);
197197- int choice = JOptionPane.showConfirmDialog(
198198- dialogFrame, message, title, optionType);
199199- dialogFrame.dispose();
200200- return choice;
201201- }
265265+ public String prompt()
266266+ {
267267+ if (counter != null)
268268+ counter.increment();
202269203203- public static final String showFramedInputDialog(
204204- Component parentComponent,
205205- Object message,
206206- String title,
207207- int messageType)
208208- {
209209- JFrame dialogFrame = createDialogFrame(parentComponent, title);
210210- String reply = JOptionPane.showInputDialog(dialogFrame, message, title, messageType);
211211- dialogFrame.dispose();
212212- return reply;
270270+ JFrame dialogFrame = createDialogFrame(parentComponent, title);
271271+272272+ Object result = JOptionPane.showInputDialog(parentComponent,
273273+ message, title, messageType,
274274+ icon, options, initialValue);
275275+276276+ dialogFrame.dispose();
277277+278278+ if (counter != null)
279279+ counter.decrement();
280280+281281+ return (String) result;
282282+ }
283283+284284+ public int choose()
285285+ {
286286+ if (counter != null)
287287+ counter.increment();
288288+289289+ JFrame dialogFrame = createDialogFrame(parentComponent, title);
290290+291291+ int result = JOptionPane.showOptionDialog(parentComponent,
292292+ message, title, optionType, messageType,
293293+ icon, options, initialValue);
294294+295295+ dialogFrame.dispose();
296296+297297+ if (counter != null)
298298+ counter.decrement();
299299+300300+ return result;
301301+ }
213302 }
214303215304 public static final void showDialog(JDialog dialog, String title)
···471560 }
472561473562 public static Color getTextColor()
474474- { return UIManager.getColor("Label.foreground"); }
563563+ {
564564+ return UIManager.getColor("Label.foreground");
565565+ }
475566476567 private static Color getBackgoundColor()
477477- { return UIManager.getColor("Label.background"); }
568568+ {
569569+ return UIManager.getColor("Label.background");
570570+ }
478571479572 private static int getBackgroundLuminance()
480573 {
+9-6
src/main/java/app/ThemesEditor.java
···7575 exitToMainMenu = true;
7676 String currentThemeName = Themes.getCurrentThemeName();
7777 if (!initialThemeName.equals(currentThemeName)) {
7878- int choice = SwingUtils.showFramedConfirmDialog(null,
7979- String.format("Theme has been changed.%nDo you want to save changes?"),
8080- "Save Changes", JOptionPane.YES_NO_CANCEL_OPTION);
7878+ int choice = SwingUtils.getConfirmDialog()
7979+ .setTitle("Save Changes")
8080+ .setMessage("Theme has been changed.", "Do you want to save changes?")
8181+ .choose();
81828283 switch (choice) {
8384 case JOptionPane.YES_OPTION:
8485 Environment.mainConfig.setString(Options.Theme, Themes.getCurrentThemeKey());
8586 Environment.mainConfig.saveConfigFile();
86878787- SwingUtils.showFramedMessageDialog(null,
8888- String.format("Theme has been changed. %nStar Rod must restart."),
8989- "Theme Changed", JOptionPane.WARNING_MESSAGE);
8888+ SwingUtils.getWarningDialog()
8989+ .setTitle("Theme Changed")
9090+ .setMessage("Theme has been changed.", "Star Rod must restart.")
9191+ .show();
9292+9093 Environment.exit();
9194 break;
9295 case JOptionPane.NO_OPTION:
···99import javax.swing.JMenuItem;
1010import javax.swing.KeyStroke;
11111212-import game.sprite.editor.ShortcutListPanel;
1313-1412/**
1513 * Key combinations that execute some action when pressed in the editor window
1614 * (specifically, when the GL canvas has focus). Each can be linked to a checkbox
···217215 }
218216219217 public JCheckBoxMenuItem getCheckBox()
220220- { return checkbox; }
218218+ {
219219+ return checkbox;
220220+ }
221221222222 private static final HashMap<Integer, EditorShortcut> inputKeyMap;
223223 private static final HashMap<Integer, EditorShortcut> inputCtrlKeyMap;
+100-54
src/main/java/game/map/editor/MapEditor.java
···580580 }
581581582582 public boolean isLoading()
583583- { return loading; }
583583+ {
584584+ return loading;
585585+ }
584586585587 /**
586588 * Start running the editor, prompting the user to select a map
···865867 if (crashMap == null)
866868 return null;
867869868868- int choice = SwingUtils.showFramedConfirmDialog(null,
869869- "Found crash data for " + crashMap.getName() + ", would you like to load?", "Crash Recovery",
870870- JOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE);
870870+ int choice = SwingUtils.getConfirmDialog()
871871+ .setTitle("Crash Recovery")
872872+ .setMessage("Found crash data for " + crashMap.getName(), "Would you like to load it?")
873873+ .setMessageType(JOptionPane.PLAIN_MESSAGE)
874874+ .setOptionsType(JOptionPane.YES_NO_OPTION)
875875+ .choose();
871876872877 if (choice == JOptionPane.YES_OPTION)
873878 return crashMap;
···894899 return baseMap;
895900 }
896901897897- gui.notify_OpenDialog();
898898- int choice = SwingUtils.showFramedConfirmDialog(null,
899899- "Found backup data for " + baseMap.getName() + ", would you like to load it instead?", "Backup Recovery",
900900- JOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE);
901901- gui.notify_CloseDialog();
902902+ int choice = SwingUtils.getConfirmDialog()
903903+ .setCounter(gui.getDialogCounter())
904904+ .setTitle("Backup Recovery")
905905+ .setMessage("Found backup data for " + baseMap.getName(), "Would you like to load it instead?")
906906+ .setMessageType(JOptionPane.PLAIN_MESSAGE)
907907+ .setOptionsType(JOptionPane.YES_NO_OPTION)
908908+ .choose();
902909903910 if (choice == JOptionPane.YES_OPTION)
904911 return backupMap;
···931938 Map selectedMap = null;
932939933940 while (true) {
934934- int choice = SwingUtils.showFramedOptionDialog(null,
935935- "Which map would you like to open?", "Choose Map",
936936- JOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE,
937937- null, options, "Browse Maps");
941941+ int choice = SwingUtils.getOptionDialog()
942942+ .setTitle("Choose Map")
943943+ .setMessage("Which map would you like to open?")
944944+ .setMessageType(JOptionPane.PLAIN_MESSAGE)
945945+ .setOptionsType(JOptionPane.YES_NO_OPTION)
946946+ .setOptions(options)
947947+ .setDefault("Browse Maps")
948948+ .choose();
938949939950 if (choice == JOptionPane.CLOSED_OPTION) {
940951 selectedMap = null;
···11301141 if (!configFile.exists()) {
11311142 Config cfg = makeNewConfig(configFile);
11321143 if (cfg == null) {
11331133- SwingUtils.showFramedMessageDialog(null,
11341134- "Failed to create new config: \n" + configFile.getAbsolutePath(),
11351135- "Create Config Failed",
11361136- JOptionPane.ERROR_MESSAGE);
11441144+ SwingUtils.getErrorDialog()
11451145+ .setTitle("Create Config Failed")
11461146+ .setMessage("Failed to create new config:", configFile.getAbsolutePath())
11471147+ .show();
11371148 return null;
11381149 }
11391150···11461157 cfg.readConfig();
11471158 }
11481159 catch (IOException e) {
11491149- SwingUtils.showFramedMessageDialog(null,
11501150- "IOException occured while reading config: \n" + configFile.getAbsolutePath(),
11511151- "Load Config Failed",
11521152- JOptionPane.ERROR_MESSAGE);
11601160+ SwingUtils.getErrorDialog()
11611161+ .setTitle("Load Config Failed")
11621162+ .setMessage("IOException occured while reading config:", configFile.getAbsolutePath())
11631163+ .show();
11531164 return null;
11541165 }
11551166 return cfg;
···14201431 }
1421143214221433 public EditorMode getEditorMode()
14231423- { return editorMode; }
14341434+ {
14351435+ return editorMode;
14361436+ }
1424143714251438 public Selection<?> getSelectionForCurrentMode()
14261439 {
···14411454 }
1442145514431456 public List<EditorObject> getEditorObjects()
14441444- { return editorObjects; }
14571457+ {
14581458+ return editorObjects;
14591459+ }
1445146014461461 public void addEditorObject(EditorObject obj)
14471462 {
···14541469 }
1455147014561471 public long getFrame()
14571457- { return frameCounter; }
14721472+ {
14731473+ return frameCounter;
14741474+ }
1458147514591476 public double getDeltaTime()
14601460- { return deltaTime; }
14771477+ {
14781478+ return deltaTime;
14791479+ }
1461148014621481 public double getTotalTime()
14631463- { return time; }
14821482+ {
14831483+ return time;
14841484+ }
1464148514651486 /**
14661487 * These methods allow the GUI to submit events to the editor.
···15171538 Logger.log("Successfully compiled " + shapeMap.getName() + "_shape");
15181539 }
15191540 catch (BuildException be) {
15201520- SwingUtilities.invokeLater(() -> {
15211521- SwingUtils.showFramedMessageDialog(gui, be.getMessage(),
15221522- "Geometry Build Failed", JOptionPane.ERROR_MESSAGE, Environment.ICON_ERROR);
15231523- });
15411541+ SwingUtils.getErrorDialog()
15421542+ .setParent(gui)
15431543+ .setTitle("Shape Build Failed")
15441544+ .setMessage(be.getMessage())
15451545+ .showLater();
15241546 }
15251547 catch (IOException ioe) {
15261548 Logger.log("Build failed: IOException. Check log for more information.", Priority.ERROR);
···15351557 Logger.log("Successfully compiled " + hitMap.getName() + "_hit");
15361558 }
15371559 catch (BuildException be) {
15381538- SwingUtilities.invokeLater(() -> {
15391539- SwingUtils.showFramedMessageDialog(gui, be.getMessage(),
15401540- "Collision Build Failed", JOptionPane.ERROR_MESSAGE, Environment.ICON_ERROR);
15411541- });
15601560+ SwingUtils.getErrorDialog()
15611561+ .setParent(gui)
15621562+ .setTitle("Collision Build Failed")
15631563+ .setMessage(be.getMessage())
15641564+ .showLater();
15421565 }
15431566 catch (IOException ioe) {
15441567 Logger.log("Build failed: IOException. Check log for more information.", Priority.ERROR);
···17051728 List<Model> models = selectionManager.getSelectedObjects(Model.class);
17061729 if (models.size() > 0) {
17071730 SwingUtilities.invokeLater(() -> {
17081708-17091731 JComboBox<RenderMode> selectionBox = new JComboBox<>(RenderMode.getEditorModes());
17101732 selectionBox.setSelectedItem(models.get(models.size() - 1).renderMode.get());
17111711- gui.notify_OpenDialog();
17121712- int choice = SwingUtils.showFramedConfirmDialog(gui, selectionBox, "Set Render Mode",
17131713- JOptionPane.OK_CANCEL_OPTION,
17141714- JOptionPane.PLAIN_MESSAGE);
17151715- gui.notify_CloseDialog();
17331733+17341734+ int choice = SwingUtils.getConfirmDialog()
17351735+ .setParent(gui)
17361736+ .setCounter(gui.getDialogCounter())
17371737+ .setTitle("Set Render Mode")
17381738+ .setMessage(selectionBox)
17391739+ .setMessageType(JOptionPane.PLAIN_MESSAGE)
17401740+ .setOptionsType(JOptionPane.OK_CANCEL_OPTION)
17411741+ .choose();
17421742+17161743 RenderMode selectedMode = (RenderMode) selectionBox.getSelectedItem();
1717174417181745 if (choice == JOptionPane.YES_OPTION && selectedMode != null) {
···32433270 }
3244327132453272 public boolean isPlayInEditorMode()
32463246- { return isPlayInEditorMode; }
32733273+ {
32743274+ return isPlayInEditorMode;
32753275+ }
3247327632483277 public PerspCameraMode getCameraMode()
32493249- { return perspCameraMode; }
32783278+ {
32793279+ return perspCameraMode;
32803280+ }
3250328132513282 public CameraController getCameraController()
32523283 {
···36673698 loadedTextures = TextureManager.load(map.texName);
3668369936693700 while (!loadedTextures) {
36703670- int choice = SwingUtils.showFramedConfirmDialog(gui,
36713671- "Could not open texture archive \"" + map.texName + "\", select a different one?",
36723672- "Missing Texture Archive",
36733673- JOptionPane.YES_NO_OPTION);
37013701+ int choice = SwingUtils.getConfirmDialog()
37023702+ .setParent(gui)
37033703+ .setTitle("Missing Texture Archive")
37043704+ .setMessage("Could not open texture archive \"" + map.texName + "\", select a different one?")
37053705+ .setOptionsType(JOptionPane.YES_NO_OPTION)
37063706+ .choose();
3674370736753708 if (choice == JOptionPane.YES_OPTION) {
36763709 File texFile = SelectTexDialog.showPrompt();
···38933926 }
3894392738953928 public Map getGeometryMap()
38963896- { return shapeOverride == null ? map : shapeOverride; }
39293929+ {
39303930+ return shapeOverride == null ? map : shapeOverride;
39313931+ }
3897393238983933 public Map getCollisionMap()
38993899- { return hitOverride == null ? map : hitOverride; }
39343934+ {
39353935+ return hitOverride == null ? map : hitOverride;
39363936+ }
3900393739013938 private void openMap(Map newMap, boolean thumbnailMode)
39023939 {
···40924129 }
4093413040944131 public Vector3f getCursorPosition()
40954095- { return cursor3D != null ? cursor3D.getPosition() : new Vector3f(); }
41324132+ {
41334133+ return cursor3D != null ? cursor3D.getPosition() : new Vector3f();
41344134+ }
4096413540974136 private void findObject()
40984137 {
···46414680 }
4642468146434682 public float getDefaultUVScale()
46444644- { return uvScale; }
46834683+ {
46844684+ return uvScale;
46854685+ }
4645468646464687 public float getNormalsLength()
46474647- { return normalsLength; }
46884688+ {
46894689+ return normalsLength;
46904690+ }
4648469146494692 public double getRotationSnap()
46504650- { return rotationSnapIncrement; }
46934693+ {
46944694+ return rotationSnapIncrement;
46954695+ }
4651469646524697 public boolean debugModeEnabled()
46534698 {
···46624707 public void displayStackTrace(Throwable t, String errorMessage)
46634708 {
46644709 SwingUtilities.invokeLater(() -> {
46654665- gui.notify_OpenDialog();
46664710 Toolkit.getDefaultToolkit().beep();
46674711 Logger.logError(errorMessage);
47124712+47134713+ gui.getDialogCounter().increment();
46684714 StarRodMain.displayStackTrace(t);
46694669- gui.notify_CloseDialog();
47154715+ gui.getDialogCounter().decrement();
46704716 });
46714717 }
46724718