public override void Load()
        {
            if (!Main.dedServ)
            {
                recipeUI = new RecipeUI();
                recipeUI.Activate();

                UI = new UserInterface();
                UI.SetState(recipeUI);
                ItemRecipeKey = RegisterHotKey("Show Item Recipe", "R");
                ItemUsageKey  = RegisterHotKey("Show Item Usage", "U");

                Utils.I18n.InitializeI18n();
            }
        }
Beispiel #2
0
        public override void Load()
        {
            Instance = this;

            OpenBrowser = this.Register("Open Browser", Keys.OemCloseBrackets);
            ShowRecipe  = this.Register("Show Recipe", Keys.R);
            ShowUsage   = this.Register("Show Usage", Keys.U);
            FindItem    = this.Register("Find Item in containers", Keys.F);
            PrevRecipe  = this.Register("Previous recipe", Keys.Back);

            if (!Main.dedServ)
            {
                for (int i = 0; i < 4; i++)
                {
                    textureSortMode.Add(ModLoader.GetTexture(TexturePath + "SortMode_" + i));
                }
                texturePause    = ModLoader.GetTexture(TexturePath + "Pause");
                texturePlay     = ModLoader.GetTexture(TexturePath + "Play");
                textureEntity   = ModLoader.GetTexture(TexturePath + "Entity");
                textureWorld    = ModLoader.GetTexture(TexturePath + "World");
                textureMagnet   = ModLoader.GetTexture(TexturePath + "Magnet");
                textureMapDeath = TextureManager.Load("Images" + Path.DirectorySeparatorChar + "MapDeath");

                IBrowserUI = new UserInterface();
                BrowserUI  = new BrowserUI();
                BrowserUI.Activate();
                IBrowserUI.SetState(BrowserUI);

                IRecipeUI = new UserInterface();
                RecipeUI  = new RecipeUI();
                RecipeUI.Activate();
                IRecipeUI.SetState(RecipeUI);

                ICheatUI = new UserInterface();
                CheatUI  = new CheatUI();
                CheatUI.Activate();
                ICheatUI.SetState(CheatUI);

                IMobUI = new UserInterface();
                MobUI  = new MobUI();
                MobUI.Activate();
                IMobUI.SetState(MobUI);
                MobUI.visible = true;
            }
        }