public void showResult(TrackRecords.TrackRecordList recordListToShow, List <int> recordsToHighlight) { prepareForPanelChange(false); Grid_Content.Children.Add(new TrackRecords.RecordDisplayPanel(recordListToShow, recordsToHighlight)); PanelState = panelState.PostRaceResults; }
private void Update() { if (!MapController.hexSelected) { currentState = panelState.NONE; } }
public void Activate(panelState state) { anim = gameObject.GetComponent<Animator>(); gameObject.SetActive(true); currentState = state; anim.Play("PopupOpen"); }
public void showPostRacePanel(RacerDetails racer, Action <TrackRecords.TrackRecordList, int> postRaceDoneHandler) { prepareForPanelChange(false); Grid_Content.Children.Add(new TrackRecords.PostRacePanel(postRaceDoneHandler, racer)); PanelState = panelState.PostRaceDisplay; }
public void showRaceFactory() { prepareForPanelChange(true); raceConfig = null; RaceFactoryPanel toAdd; if (ss_isActive && ss_savedPanel != null) { toAdd = ss_savedPanel; ss_isActive = false; } else { toAdd = new RaceFactoryPanel(factoryComplete); } Grid_Content.Children.Add(toAdd); PanelState = panelState.RaceFactory; ss_lastActivity = DateTime.Now; if (AntPlusRacerConfig.getInstance().RecordScreenSaverTimeout_negativeIsOff > 0) { ss_ScreenSaverTimer.Start(); } }
public void showRecords() { if (ss_isActive) { ss_savedPanel = Grid_Content.Children[0] as RaceFactoryPanel; } prepareForPanelChange(true); Grid_Content.Children.Add(new TrackRecords.RecordDisplayPanel()); PanelState = panelState.RecordDisplay; }
void recordDisplayScreenSaver_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { if (DateTime.Now.Subtract(ss_lastActivity).TotalSeconds > AntPlusRacerConfig.getInstance().RecordScreenSaverTimeout_negativeIsOff) { lock (ss_ScreenSaverTimer) { if (!ss_isActive) { ss_lastActivity = DateTime.Now; ss_ignoreFirstMove = true; ss_isActive = true; Dispatcher.Invoke((Action)showRecords); PanelState = panelState.ScreenSaverRecordDisplay; } } } }
public void showRaces() { if (raceConfig == null || raceConfig.isRaceFinished) { showRaceFactory(); return; } prepareForPanelChange(false); for (int i = 0; i < raceConfig.racerDetails.Count; ++i) { Grid_Content.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Star) }); Grid.SetRow(raceConfig.racerDetails[i].racePanel, i); Grid_Content.Children.Add(raceConfig.racerDetails[i].racePanel); } PanelState = panelState.Racing; }
public void showAntConfig() { prepareForPanelChange(true); UIElement antCfg; try { antCfg = AntConfigPanel.getInstanceForDisplay(); } catch (Exception ex) { Viewbox vb = new Viewbox(); vb.Child = new Label() { Content = "Error: " + ex.Message }; antCfg = vb; } Grid_Content.Children.Add(antCfg); PanelState = panelState.Config; }
public static void SetCurrentState(panelState newState) { currentState = newState; }
public static void SetPanelState(panelState state) { currentState = state; }