Ejemplo n.º 1
0
        public AnimatedCogsMenu()
        {
            const string BUTTON_BACKGROUND_PATH = "Sprites/UI/Menu/buttonBackground";
            buttonTexture = GameResources.Content.Load<Texture2D>(BUTTON_BACKGROUND_PATH);

            isInMenuRoot = true;
            easingFunction = new GaussianFunction(6f, 3f);
            const string LARGE_COG_PATH = "Sprites/UI/Menu/largeCog";
            const string SMALL_COG_PATH = "Sprites/UI/Menu/smallCog";

            const string FONT_PATH = "Fonts/forque";
            normalTextColor = Color.Gold;
            selectedTextColor = Color.White;
            this.origin = largeCogOrigin;

            lineSpacing = 100;
            marginLeft = 200;
            marginBottom = 300;
            initialized = true;
            Font = GameResources.Content.Load<SpriteFont>(FONT_PATH);
            largeCogTexture = GameResources.Content.Load<Texture2D>(LARGE_COG_PATH);
            smallCogTexture = GameResources.Content.Load<Texture2D>(SMALL_COG_PATH);

            SelectNewEntries = SelectMainMenu;
            easingFunctionArg = 0f;
            rotatesForward = true;
        }
Ejemplo n.º 2
0
        public void OpenAnimSet()
        {
            SourceAnimSet = null;
            SourcePcc?.Dispose();
            SourcePcc = null;
            LiveFile?.Dispose();
            LiveFile = null;
            ActorTag = null;

            var dlg = new OpenFileDialog
            {
                Filter          = App.ME3ME2SaveFileFilter,
                CheckFileExists = true,
                Multiselect     = false,
                Title           = "Select ME3 file containing the FaceFXAnimSet you want to edit"
            };

            if (dlg.ShowDialog() == true)
            {
                try
                {
                    SourcePcc = MEPackageHandler.OpenME3Package(dlg.FileName);
                }
                catch (FormatException)
                {
                    MessageBox.Show("Must be an ME3 file!");
                    return;
                }

                if (EntrySelector.GetEntry <ExportEntry>(null, SourcePcc, "Choose FaceFxAnimSet to edit", exp => exp.ClassName == "FaceFXAnimSet") is ExportEntry animSetEntry)
                {
                    SourceAnimSet = animSetEntry.GetBinaryData <FaceFXAnimSet>();
                }
            }
        }
 private void _paintList(List <EntryElement> list)
 {
     EntrySelector.BeginUpdate();
     EntrySelector.Items.Clear();
     foreach (EntryElement entry in list)
     {
         ListViewItem nEntry = new ListViewItem(entry.Title);
         nEntry.SubItems.Add(entry.Url);
         nEntry.SubItems.Add(entry.AccessTime.ToString());
         EntrySelector.Items.Add(nEntry);
     }
     EntrySelector.EndUpdate();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Event handler for when the Options menu entry is selected.
 /// </summary>
 void OptionsMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     SoundManager.PlaySound("cogs");
     SelectNewEntries = SelectOptionsMenu;
     easingFunctionArg = 0f;
     rotatesForward = true;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// When the user cancels the main menu, ask if they want to exit the sample.
 /// </summary>
 void OnCancel(object sender, PlayerIndexEventArgs e)
 {
     if (!isInMenuRoot)
     {
         SoundManager.PlaySound("cogs");
         SelectNewEntries = SelectMainMenu;
         easingFunctionArg = 0f;
         rotatesForward = true;
         SelectOptionsMenu();
     }
     else
     {
         BomberGame.ExitRequested = true;
     }
 }