示例#1
0
        public void InitMenuInterface()
        {
            float   spacing    = 80;
            Vector2 UIposition = new Vector2(35, 180);

            menu_start        = new ClicableElement(fontMenu, "- START", UIposition, "start", Color.White, "default", true);
            settings_musicOn  = new ClicableElement(fontMenu, "- MUSIC : ON", UIposition, "musicoff", Color.White, "default", true);
            settings_musicOff = new ClicableElement(fontMenu, "- MUSIC : OFF", UIposition, "musicon", Color.White, "default", true);
            UIposition       += new Vector2(0, spacing);
            menu_settings     = new ClicableElement(fontMenu, "- SETTINGS", UIposition, "settings", Color.White, "default", true);
            settings_soundOn  = new ClicableElement(fontMenu, "- SOUND : ON", UIposition, "soundoff", Color.White, "default", true);
            settings_soundOff = new ClicableElement(fontMenu, "- SOUND : OFF", UIposition, "soundon", Color.White, "default", true);
            UIposition       += new Vector2(0, spacing);
            menu_exit         = new ClicableElement(fontMenu, "- EXIT", UIposition, "exit", Color.White, "default", true);
            settings_exit     = new ClicableElement(fontMenu, "- EXIT", UIposition, "settingsexit", Color.White, "default", true);
        }
示例#2
0
        public void createButton(SpriteBatch pSpriteBatch, Vector2 pPosition, string pText, string pAction, SpriteFont pFont, string pOrigin, Color pColor, bool pIsInteractable)
        {
            ClicableElement newButton = new ClicableElement(pFont, pText, pPosition, pAction, pColor, pOrigin, pIsInteractable);

            list_clicableElements.Add(newButton);
        }