Esempio n. 1
0
        public KerbulatorGUI(IGlue glue, bool inEditor, bool drawMainButton, KerbulatorOptions options)
        {
            this.glue           = glue;
            this.inEditor       = inEditor;
            this.drawMainButton = drawMainButton;
            this.options        = options;
            ChangeState(false);

            // Use the game base directory + PluginData as base folder for plugin data
            functionDir = glue.GetFunctionDir();
            functionDir = functionDir.Replace("\\", "/");

            Debug.Log("Kerbulator function dir: " + functionDir);

            editFunctionContent = maneuverTemplate;

            if (!Directory.Exists(functionDir))
            {
                Directory.CreateDirectory(functionDir);
            }

            // Load icons
            kerbulatorIcon = glue.GetTexture("kerbulator");
            editIcon       = glue.GetTexture("edit");
            runIcon        = glue.GetTexture("run");
            repeatIcon     = glue.GetTexture("repeat");
            nodeIcon       = glue.GetTexture("node");
            alarmIcon      = glue.GetTexture("alarm");
            saveIcon       = glue.GetTexture("save");
            deleteIcon     = glue.GetTexture("delete");

            kalc = new Kerbulator(functionDir);
        }