Example #1
0
 public MainForm()
 {
     InitializeComponent();
     OpenTK.Toolkit.Init();
     glControl1.CreateControl();
     SettingsFile.LoadGlobalSettings("default");
     glControl1.MouseWheel  += new MouseEventHandler(glControl1_Wheel);
     ProjMatrix              = Matrix4.CreatePerspectiveFieldOfView(FOV, (float)glControl1.Width / (float)glControl1.Height, 100f, 100000f);
     glControl1.Enabled      = false;
     KeyPreview              = true;
     treeView1.HideSelection = false;
     camera.updateMatrix(ref camMtx);
     //foreach(ObjectComboEntry entry in Globals.objectComboEntries) Console.WriteLine(entry.ToString());
 }
Example #2
0
        public StartupForm()
        {
            InitializeComponent();
            SettingsFile.LoadGlobalSettings("default");
            UpdateTheme();

            if (Globals.lastUsedROMs.Count > 0)
            {
                noROMsOpenedLabel.Visible = false;
                int x = noROMsOpenedLabel.Location.X;
                int y = noROMsOpenedLabel.Location.Y;

                foreach (string romPath in Globals.lastUsedROMs)
                {
                    string romFileName = Path.GetFileNameWithoutExtension(romPath);

                    if (romFileName.EndsWith(".ext"))
                    {
                        romFileName = romFileName.Substring(0, romFileName.Length - 4);
                    }

                    LinkLabel romLink = new LinkLabel();
                    romLink.Font     = new Font("Microsoft Sans Serif", 10);
                    romLink.AutoSize = true;
                    romLink.Text     = romFileName;

                    if (Path.GetFileNameWithoutExtension(Theme.lastThemePath) == "dark")
                    {
                        romLink.LinkColor = Color.White;
                    }
                    else
                    {
                        romLink.LinkColor = Color.Black;
                    }

                    romLink.BackColor = Color.Transparent;
                    romLink.Location  = new Point(x, y);
                    y = y + 15;

                    romLink.Click += (s, e) =>
                    {
                        OpenROM(romPath);
                    };

                    Controls.Add(romLink);
                }
            }
        }