// Path: src/main/java/craftedcart/smblevelworkshop/resource/LangManager.java
// public class LangManager {
// 
//     //                         <Locale,    <Key   , Value >>
//     @NotNull private static Map<String, Map<String, String>> localeMap = new HashMap<>();
//     @NotNull private static String selectedLang = "en_US";
// 
//     /**
//      * Add an item given a locale, key and value
//      *
//      * @param locale The language locale (eg: en_US)
//      * @param key The identifier
//      * @param value The translated string
//      */
//     public static void addItem(String locale, String key, String value) {
//         if (localeMap.containsKey(locale)) {
//             Map<String, String> langMap = localeMap.get(locale);
//             langMap.put(key, value);
//             localeMap.put(locale, langMap);
//         } else {
//             Map<String, String> langMap = new HashMap<>();
//             langMap.put(key, value);
//             localeMap.put(locale, langMap);
//         }
//     }
// 
//     /**
//      * Get a translated string, given a locale and key
//      *
//      * @param locale The language locale (eg: en_US)
//      * @param key The identifier
//      * @return The translated string, or the key if the entry wasn't found
//      */
//     public static String getItem(String locale, String key) {
//         if (localeMap.containsKey(locale)) {
//             if (localeMap.get(locale).containsKey(key)) {
//                 return localeMap.get(locale).get(key);
//             } else {
//                 return key;
//             }
//         } else {
//             return key;
//         }
//     }
// 
//     public static String getItem(String key) {
//         return getItem(selectedLang, key);
//     }
// 
//     public static void setSelectedLang(@NotNull String selectedLang) {
//         LangManager.selectedLang = selectedLang;
//     }
// 
//     @NotNull
//     public static String getSelectedLang() {
//         return selectedLang;
//     }
// 
// }


import craftedcart.smblevelworkshop.resource.LangManager;
import io.github.craftedcart.fluidui.FluidUIScreen;
import io.github.craftedcart.fluidui.FontCache;
import io.github.craftedcart.fluidui.component.*;
import io.github.craftedcart.fluidui.plugin.PluginSmoothAnimateAnchor;
import io.github.craftedcart.fluidui.plugin.PluginSmoothAnimatePanelBackgroundColor;
import io.github.craftedcart.fluidui.uiaction.UIAction;
import io.github.craftedcart.fluidui.util.UIColor;
import org.jetbrains.annotations.Nullable;
package craftedcart.smblevelworkshop.ui;


/**
 * @author CraftedCart
 *         Created on 24/09/2016 (DD/MM/YYYY)
 */
public class ExportProgressOverlayUIScreen extends FluidUIScreen {

    private final ListBox listBox = new ListBox();
    private final TextButton okButton = new TextButton();

    @Nullable private UIAction onPreDrawAction;

    public ExportProgressOverlayUIScreen() {
        init();
    }

    private void init() {

        final Panel backgroundPanel = new Panel();
        backgroundPanel.setOnInitAction(() -> {
            backgroundPanel.setTheme(new DialogUITheme());

            backgroundPanel.setTopLeftPos(0, 0);
            backgroundPanel.setBottomRightPos(0, 0);
            backgroundPanel.setTopLeftAnchor(0, 0);
            backgroundPanel.setBottomRightAnchor(1, 1);
            backgroundPanel.setBackgroundColor(UIColor.transparent());
        });
        addChildComponent("backgroundPanel", backgroundPanel);

        final Panel mainPanel = new Panel();
        mainPanel.setOnInitAction(() -> {
            mainPanel.setTopLeftPos(-256, -256);
            mainPanel.setBottomRightPos(256, 256);
            mainPanel.setTopLeftAnchor(0.5, 1.5);
            mainPanel.setBottomRightAnchor(0.5, 1.5);

            PluginSmoothAnimateAnchor mainPanelAnimAnchor = new PluginSmoothAnimateAnchor();
            mainPanelAnimAnchor.setTargetTopLeftAnchor(0.5, 0.5);
            mainPanelAnimAnchor.setTargetBottomRightAnchor(0.5, 0.5);
            mainPanel.addPlugin(mainPanelAnimAnchor);
// Path: src/main/java/craftedcart/smblevelworkshop/resource/LangManager.java
// public class LangManager {
// 
//     //                         <Locale,    <Key   , Value >>
//     @NotNull private static Map<String, Map<String, String>> localeMap = new HashMap<>();
//     @NotNull private static String selectedLang = "en_US";
// 
//     /**
//      * Add an item given a locale, key and value
//      *
//      * @param locale The language locale (eg: en_US)
//      * @param key The identifier
//      * @param value The translated string
//      */
//     public static void addItem(String locale, String key, String value) {
//         if (localeMap.containsKey(locale)) {
//             Map<String, String> langMap = localeMap.get(locale);
//             langMap.put(key, value);
//             localeMap.put(locale, langMap);
//         } else {
//             Map<String, String> langMap = new HashMap<>();
//             langMap.put(key, value);
//             localeMap.put(locale, langMap);
//         }
//     }
// 
//     /**
//      * Get a translated string, given a locale and key
//      *
//      * @param locale The language locale (eg: en_US)
//      * @param key The identifier
//      * @return The translated string, or the key if the entry wasn't found
//      */
//     public static String getItem(String locale, String key) {
//         if (localeMap.containsKey(locale)) {
//             if (localeMap.get(locale).containsKey(key)) {
//                 return localeMap.get(locale).get(key);
//             } else {
//                 return key;
//             }
//         } else {
//             return key;
//         }
//     }
// 
//     public static String getItem(String key) {
//         return getItem(selectedLang, key);
//     }
// 
//     public static void setSelectedLang(@NotNull String selectedLang) {
//         LangManager.selectedLang = selectedLang;
//     }
// 
//     @NotNull
//     public static String getSelectedLang() {
//         return selectedLang;
//     }
// 
// }


// Path: src/main/java/craftedcart/smblevelworkshop/ui/ExportProgressOverlayUIScreen.java
import craftedcart.smblevelworkshop.resource.LangManager;
import io.github.craftedcart.fluidui.FluidUIScreen;
import io.github.craftedcart.fluidui.FontCache;
import io.github.craftedcart.fluidui.component.*;
import io.github.craftedcart.fluidui.plugin.PluginSmoothAnimateAnchor;
import io.github.craftedcart.fluidui.plugin.PluginSmoothAnimatePanelBackgroundColor;
import io.github.craftedcart.fluidui.uiaction.UIAction;
import io.github.craftedcart.fluidui.util.UIColor;
import org.jetbrains.annotations.Nullable;

package craftedcart.smblevelworkshop.ui;


/**
 * @author CraftedCart
 *         Created on 24/09/2016 (DD/MM/YYYY)
 */
public class ExportProgressOverlayUIScreen extends FluidUIScreen {

    private final ListBox listBox = new ListBox();
    private final TextButton okButton = new TextButton();

    @Nullable private UIAction onPreDrawAction;

    public ExportProgressOverlayUIScreen() {
        init();
    }

    private void init() {

        final Panel backgroundPanel = new Panel();
        backgroundPanel.setOnInitAction(() -> {
            backgroundPanel.setTheme(new DialogUITheme());

            backgroundPanel.setTopLeftPos(0, 0);
            backgroundPanel.setBottomRightPos(0, 0);
            backgroundPanel.setTopLeftAnchor(0, 0);
            backgroundPanel.setBottomRightAnchor(1, 1);
            backgroundPanel.setBackgroundColor(UIColor.transparent());
        });
        addChildComponent("backgroundPanel", backgroundPanel);

        final Panel mainPanel = new Panel();
        mainPanel.setOnInitAction(() -> {
            mainPanel.setTopLeftPos(-256, -256);
            mainPanel.setBottomRightPos(256, 256);
            mainPanel.setTopLeftAnchor(0.5, 1.5);
            mainPanel.setBottomRightAnchor(0.5, 1.5);

            PluginSmoothAnimateAnchor mainPanelAnimAnchor = new PluginSmoothAnimateAnchor();
            mainPanelAnimAnchor.setTargetTopLeftAnchor(0.5, 0.5);
            mainPanelAnimAnchor.setTargetBottomRightAnchor(0.5, 0.5);
            mainPanel.addPlugin(mainPanelAnimAnchor);
        });