예제 #1
0
        private void onTick(object sender, EventArgs e)
        {
            if (firstTime)             // if this is the users first time loading the mod, this information will appear
            {
                GTA.UI.Screen.ShowSubtitle(ModName + " by " + Developer + " Loaded");
                firstTime = false;

                // setup tasks
                race = new RaceControl();
                readSettings(base.Settings);
                KeyDown += onKeyDown;
                try
                {
                    menu = new NativeUIMenu(ref race);
                }
                catch
                {
                    GTA.UI.Notification.Show("Lap Timer: ~r~Failed to initialize menu. Make sure you have NativeUI.dll");
                }
            }


            // race mode checkpoint detection
            if (race.raceMode)
            {
                race.activeCheckpointDetection();
            }
        }
예제 #2
0
        public NativeUIMenu(ref RaceControl raceControl)
        {
            race = raceControl;

            // create new menu pool & add the main menu to it
            _menuPool = new MenuPool();
            _menuPool.Add(buildMainMenu());
        }