AGS.Plugin.Lua.LuaForAGSEditorComponent.LuaForAGSEditorComponent C# (CSharp) Метод

LuaForAGSEditorComponent() публичный Метод

public LuaForAGSEditorComponent ( IAGSEditor editor ) : System
editor IAGSEditor
Результат System
        public LuaForAGSEditorComponent(IAGSEditor editor)
        {
            main_L = InvokeLua.luaL_newstate();
            InvokeLua.lua_atpanic(main_L, InvokeLua.ExceptionPanicHandler);
            this.editor = editor;
            editor.GUIController.RegisterIcon("LuaIcon", GetIcon("lua.ico"));
            editor.GUIController.RegisterIcon("LuaGreyIcon", GetIcon("luagrey.ico"));
            editor.GUIController.RegisterIcon("CogIcon", GetIcon("cog.ico"));
            editor.GUIController.RegisterIcon("EmptyIcon", GetIcon("empty.ico"));
            editor.GUIController.RegisterIcon("silk:table", GetIcon("table.ico"));
            editor.GUIController.RegisterIcon("silk:world", GetIcon("world.ico"));
            editor.GUIController.RegisterIcon("silk:wrench", GetIcon("wrench.ico"));
            editor.GUIController.RegisterIcon("silk:textfield", GetIcon("textfield.ico"));
            editor.GUIController.RegisterIcon("silk:contrast", GetIcon("contrast.ico"));
            editor.GUIController.RegisterIcon("silk:page_white_lightning", GetIcon("page_white_lightning.ico"));
            editor.GUIController.ProjectTree.AddTreeRoot(this, CONTROL_ID_LUA, "Lua", "LuaIcon");

            editor.GUIController.AddMenu(this, LUA_MENU, "Lua", editor.GUIController.FileMenuID);
            MenuCommands newCommands = new MenuCommands(LUA_MENU);
            newCommands.Commands.Add(new MenuCommand(LUA_CONVERT_MENUOPTION, "Open Code Converter..."));
            editor.GUIController.AddMenuItems(this, newCommands);

            IsPluginEnabled = false;
            globalsTable = new VisualLuaTableValue(this, VISUAL_ROOT);
            globalsTable.Name = "_G";
            globalsTable.IsGlobalScope = true;

            codeConvertPane = new CodeConvertPane(editor);
            codeConvertContentDoc = new ContentDocument(codeConvertPane, "Convert AGS->Lua Script", this);
        }