q&d fix for spinner initialise to blank label on crafting ui

This commit is contained in:
minjaesong
2022-06-29 02:53:17 +09:00
parent 9edfc90ad8
commit 068721376f
7 changed files with 65 additions and 37 deletions

View File

@@ -1226,6 +1226,13 @@ public class App implements ApplicationListener {
*/
public static int getConfigInt(String key) {
Object cfg = getConfigMaster(key);
if (cfg instanceof Integer) return ((int) cfg);
double value = (double) cfg;
if (Math.abs(value % 1.0) < 0.00000001)
return (int) Math.round(value);
return ((int) cfg);
}