Ejemplo n.º 1
0
        public void RegisterExportSettings()
        {
            // TODO: These would be better as export preset options, but that doesn't seem to be supported yet

            GlobalDef("mono/export/include_scripts_content", false);
            GlobalDef("mono/export/export_assemblies_inside_pck", true);

            GlobalDef("mono/export/i18n_codesets", I18NCodesets.All);

            ProjectSettings.AddPropertyInfo(new Godot.Collections.Dictionary
            {
                ["type"]        = Variant.Type.Int,
                ["name"]        = "mono/export/i18n_codesets",
                ["hint"]        = PropertyHint.Flags,
                ["hint_string"] = "CJK,MidEast,Other,Rare,West"
            });

            GlobalDef("mono/export/aot/enabled", false);
            GlobalDef("mono/export/aot/full_aot", false);
            GlobalDef("mono/export/aot/use_interpreter", true);

            // --aot or --aot=opt1,opt2 (use 'mono --aot=help AuxAssembly.dll' to list AOT options)
            GlobalDef("mono/export/aot/extra_aot_options", new string[] { });
            // --optimize/-O=opt1,opt2 (use 'mono --list-opt'' to list optimize options)
            GlobalDef("mono/export/aot/extra_optimizer_options", new string[] { });

            GlobalDef("mono/export/aot/android_toolchain_path", "");
        }
Ejemplo n.º 2
0
    public override void _EnterTree()
    {
        // Settings
        foreach (String key in settings.Keys)
        {
            String property_name = $"ink/{key}";
            if (!ProjectSettings.HasSetting(property_name))
            {
                Dictionary setting = settings[key] as Dictionary;
                ProjectSettings.SetSetting(property_name, setting["default"]);
                ProjectSettings.AddPropertyInfo(new Dictionary()
                {
                    { "name", property_name },
                    { "type", setting["type"] },
                    { "hint", setting["hint"] },
                    { "hint_string", setting["hint_string"] },
                });
            }
        }
        ProjectSettings.Save();

        // Resources
        importPlugin = GD.Load <GDScript>(importPluginScriptPath).New() as EditorImportPlugin;
        AddImportPlugin(importPlugin);

        // Custom types
        AddCustomType("Ink Story", "Node", GD.Load <Script>(customTypeScriptPath), GD.Load <Texture>(customTypeIconPath));

        // Editor
        dock = GD.Load <PackedScene>(dockScene).Instance() as Control;
        AddControlToBottomPanel(dock, "Ink");
    }
Ejemplo n.º 3
0
        private static void AddSetting(string title, Variant.Type type, object value)
        {
            title = SettingPath(title);
            if (ProjectSettings.HasSetting(title))
            {
                return;
            }
            ProjectSettings.SetSetting(title, value);
            var info = new Dictionary
            {
                ["name"] = title,
                ["type"] = type
            };

            ProjectSettings.AddPropertyInfo(info);
        }