protected override void OnFirstTick() { base.OnFirstTick(); Team winningteam = GetWinningTeam(); if (winningteam != null) { winningteam.DoAction(EnterWinPose); Win win = new Win(Victory.Normal, winningteam.VictoryStatus.WinPerfect == true); winningteam.AddWin(win); if (winningteam.OtherTeam.VictoryStatus.LoseTime == true) { winningteam.OtherTeam.DoAction(EnterTimeLosePose); } if (winningteam.TeamMate != null && CurrentElement != null) { DisplayString = Engine.GetSubSystem<StringFormatter>().BuildString(CurrentElement.DataMap.Text, winningteam.MainPlayer.Profile.DisplayName, winningteam.TeamMate.Profile.DisplayName); } else { DisplayString = Engine.GetSubSystem<StringFormatter>().BuildString(CurrentElement.DataMap.Text, winningteam.MainPlayer.Profile.DisplayName); } } else { Engine.Team1.DoAction(EnterTimeLosePose); Engine.Team2.DoAction(EnterTimeLosePose); } }
void OnDestroy() { foreach(GameObject obj in enemies) { Destroy (obj); } Win winEvent = new Win (); GameEvents.GameEventManager.post (winEvent); }
//public GameObject fire; // Use this for initialization void Start () { Flip (); pointA = transform.position.x; pointB = transform.position.x - 80; anim = GetComponent<Animator>(); rope = this.transform.GetChild(0).gameObject; Fire = FindObjectOfType<FirePit> (); win = FindObjectOfType<Win> (); //fire = FirePit.Fire; }
public void Activate(Win.DiagramControl dc) { // HACK: ensure that the singleton Selection refers to the correct diagram. // Selection should probably not be a singleton, but that would require // substantial changes to Netron. Selection.Clear(); Selection.Controller = dc.Controller; Selection.Controller.View.ResetGhost(); Selection.Controller.View.ResetTracker(); Selection.Controller.View.Invalidate(); }
/// <summary> /// The set title. /// </summary> /// <param name="window"> /// The window. /// </param> /// <param name="title"> /// The title. /// </param> internal static void SetTitle(IntPtr window, string title) { if (CefRuntime.Platform == CefRuntimePlatform.Windows) { Win.gtk_window_set_title(window, title); } if (CefRuntime.Platform == CefRuntimePlatform.Linux) { Linux.gtk_window_set_title(window, title); } }
/// <summary> /// The quit. /// </summary> internal static void Quit() { if (CefRuntime.Platform == CefRuntimePlatform.Windows) { Win.gtk_main_quit(); } if (CefRuntime.Platform == CefRuntimePlatform.Linux) { Linux.gtk_main_quit(); } }
/// <summary> /// The show all. /// </summary> /// <param name="window"> /// The window. /// </param> internal static void ShowAll(IntPtr window) { if (CefRuntime.Platform == CefRuntimePlatform.Windows) { Win.gtk_widget_show_all(window); } if (CefRuntime.Platform == CefRuntimePlatform.Linux) { Linux.gtk_widget_show_all(window); } }
/// <summary> /// The init window. /// </summary> /// <param name="argc"> /// The argc. /// </param> /// <param name="argv"> /// The argv. /// </param> internal static void InitWindow(int argc, string[] argv) { if (CefRuntime.Platform == CefRuntimePlatform.Windows) { Win.gtk_init(argc, argv); } if (CefRuntime.Platform == CefRuntimePlatform.Linux) { Linux.gtk_init(argc, argv); } }
internal static void ConnectSignal(IntPtr window, string name, Delegate callback, int key, IntPtr data, int flags) { if (CefRuntime.Platform == CefRuntimePlatform.Windows) { Win.g_signal_connect_data(window, name, callback, key, data, flags); } if (CefRuntime.Platform == CefRuntimePlatform.Linux) { Linux.g_signal_connect_data(window, name, callback, key, data, flags); } }
internal static void AddConfigureEvent(IntPtr window) { if (CefRuntime.Platform == CefRuntimePlatform.Windows) { Win.gtk_widget_add_events(window, GtkEvent.GDK_CONFIGURE); } if (CefRuntime.Platform == CefRuntimePlatform.Linux) { Linux.gtk_widget_add_events(window, GtkEvent.GDK_CONFIGURE); } }
internal static void SetWindowPosition(IntPtr window, GtkWindowPosition position) { if (CefRuntime.Platform == CefRuntimePlatform.Windows) { Win.gtk_window_set_position(window, position); } if (CefRuntime.Platform == CefRuntimePlatform.Linux) { Linux.gtk_window_set_position(window, position); } }
internal static void SetWindowResizable(IntPtr window, bool resizable) { if (CefRuntime.Platform == CefRuntimePlatform.Windows) { Win.gtk_window_set_resizable(window, resizable); } if (CefRuntime.Platform == CefRuntimePlatform.Linux) { Linux.gtk_window_set_resizable(window, resizable); } }
internal static void SetSizeRequest(IntPtr window, int width, int height) { if (CefRuntime.Platform == CefRuntimePlatform.Windows) { Win.gtk_widget_set_size_request(window, width, height); } if (CefRuntime.Platform == CefRuntimePlatform.Linux) { Linux.gtk_widget_set_size_request(window, width, height); } }
internal static void SetWindowSize(IntPtr window, int width, int height) { if (CefRuntime.Platform == CefRuntimePlatform.Windows) { Win.gtk_window_resize(window, width, height); } if (CefRuntime.Platform == CefRuntimePlatform.Linux) { Linux.gtk_window_resize(window, width, height); } }
public void ProcessResult(IEnumerable <int> winners) { Count++; if (winners.Count() > 1) { Draw++; } else { Win.Find(winners.First()).Wins++; } }
/// <summary> /// The set window maximize. /// </summary> /// <param name="window"> /// The window. /// </param> internal static void SetWindowMaximize(IntPtr window) { if (CefRuntime.Platform == CefRuntimePlatform.Windows) { Win.gtk_window_maximize(window); } if (CefRuntime.Platform == CefRuntimePlatform.Linux) { Linux.gtk_window_maximize(window); } }
/// <summary> /// The set fullscreen. /// </summary> /// <param name="window"> /// The window. /// </param> internal static void SetFullscreen(IntPtr window) { if (CefRuntime.Platform == CefRuntimePlatform.Windows) { Win.gtk_window_fullscreen(window); } if (CefRuntime.Platform == CefRuntimePlatform.Linux) { Linux.gtk_window_fullscreen(window); } }
static void FinalizeSections(ref IMAGE_NT_HEADERS OrgNTHeaders, IntPtr pCode, IntPtr pNTHeaders, uint PageSize) { UIntPtr imageOffset = (Is64BitProcess ? (UIntPtr)(unchecked ((ulong)pCode.ToInt64()) & 0xffffffff00000000) : UIntPtr.Zero); IntPtr pSection = Win.IMAGE_FIRST_SECTION(pNTHeaders, OrgNTHeaders.FileHeader.SizeOfOptionalHeader); IMAGE_SECTION_HEADER Section = PtrRead <IMAGE_SECTION_HEADER>(pSection); SectionFinalizeData sectionData = new SectionFinalizeData(); sectionData.Address = PtrBitOr(PtrAdd((IntPtr)0, Section.PhysicalAddress), imageOffset); sectionData.AlignedAddress = PtrAlignDown(sectionData.Address, (UIntPtr)PageSize); sectionData.Size = GetRealSectionSize(ref Section, ref OrgNTHeaders); sectionData.Characteristics = Section.Characteristics; sectionData.Last = false; pSection = PtrAdd(pSection, Sz.IMAGE_SECTION_HEADER); // loop through all sections and change access flags for (int i = 1; i < OrgNTHeaders.FileHeader.NumberOfSections; i++, pSection = PtrAdd(pSection, Sz.IMAGE_SECTION_HEADER)) { Section = PtrRead <IMAGE_SECTION_HEADER>(pSection); IntPtr sectionAddress = PtrBitOr(PtrAdd((IntPtr)0, Section.PhysicalAddress), imageOffset); IntPtr alignedAddress = PtrAlignDown(sectionAddress, (UIntPtr)PageSize); IntPtr sectionSize = GetRealSectionSize(ref Section, ref OrgNTHeaders); // Combine access flags of all sections that share a page // TODO(fancycode): We currently share flags of a trailing large section with the page of a first small section. This should be optimized. IntPtr a = PtrAdd(sectionData.Address, sectionData.Size); ulong b = unchecked ((ulong)a.ToInt64()), c = unchecked ((ulong)alignedAddress); if (sectionData.AlignedAddress == alignedAddress || unchecked ((ulong)PtrAdd(sectionData.Address, sectionData.Size).ToInt64()) > unchecked ((ulong)alignedAddress)) { // Section shares page with previous if ((Section.Characteristics & Win.IMAGE_SCN_MEM_DISCARDABLE) == 0 || (sectionData.Characteristics & Win.IMAGE_SCN_MEM_DISCARDABLE) == 0) { sectionData.Characteristics = (sectionData.Characteristics | Section.Characteristics) & ~Win.IMAGE_SCN_MEM_DISCARDABLE; } else { sectionData.Characteristics |= Section.Characteristics; } sectionData.Size = PtrSub(PtrAdd(sectionAddress, sectionSize), sectionData.Address); continue; } FinalizeSection(sectionData, PageSize, OrgNTHeaders.OptionalHeader.SectionAlignment); sectionData.Address = sectionAddress; sectionData.AlignedAddress = alignedAddress; sectionData.Size = sectionSize; sectionData.Characteristics = Section.Characteristics; } sectionData.Last = true; FinalizeSection(sectionData, PageSize, OrgNTHeaders.OptionalHeader.SectionAlignment); }
public override void Setup() { Win.X = 3; Win.Y = 3; Win.Width = Dim.Fill() - 3; Win.Height = Dim.Fill() - 3; var label = new Label("ScrollView (new Rect (2, 2, 50, 20)) with a 200, 100 ContentSize...") { X = 0, Y = 0, ColorScheme = Colors.Dialog }; Win.Add(label); // BUGBUG: ScrollView only supports Absolute Positioning (#72) var scrollView = new ScrollView(new Rect(2, 2, 50, 20)) { ColorScheme = Colors.TopLevel, ContentSize = new Size(200, 100), //ContentOffset = new Point (0, 0), ShowVerticalScrollIndicator = true, ShowHorizontalScrollIndicator = true, }; const string rule = "0123456789"; var horizontalRuler = new Label() { X = 0, Y = 0, Width = Dim.Fill(), // FIXED: I don't think this should be needed; DimFill() should respect container's frame. X does. Height = 2, ColorScheme = Colors.Error }; scrollView.Add(horizontalRuler); const string vrule = "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n"; var verticalRuler = new Label() { X = 0, Y = 0, Width = 1, Height = Dim.Fill(), ColorScheme = Colors.Error }; scrollView.Add(verticalRuler); void Top_Loaded() { horizontalRuler.Text = rule.Repeat((int)Math.Ceiling((double)(horizontalRuler.Bounds.Width) / (double)rule.Length)) [0..(horizontalRuler.Bounds.Width)] +
public override void Setup() { List <string> items = new List <string> (); foreach (var dir in new [] { "/etc", @"\windows\System32" }) { if (Directory.Exists(dir)) { items = Directory.GetFiles(dir) .Select(Path.GetFileName) .Where(x => char.IsLetterOrDigit(x [0])) .Distinct() .OrderBy(x => x).ToList(); } } // ListView var lbListView = new Label("Listview") { ColorScheme = Colors.TopLevel, X = 0, Width = 30 }; var listview = new ListView(items) { X = 0, Y = Pos.Bottom(lbListView) + 1, Width = 30 }; listview.OpenSelectedItem += (object sender, ListViewItemEventArgs e) => lbListView.Text = items [listview.SelectedItem]; Win.Add(lbListView, listview); // ComboBox var lbComboBox = new Label("ComboBox") { ColorScheme = Colors.TopLevel, X = Pos.Right(lbListView) + 1, Width = 30 }; var comboBox = new ComboBox(0, 0, 30, 10, items) { X = Pos.Right(listview) + 1, Y = Pos.Bottom(lbListView) + 1, Width = 30 }; comboBox.Changed += (object sender, ustring text) => lbComboBox.Text = text; Win.Add(lbComboBox, comboBox); }
void Update() { score = PlayerPrefs.GetInt("CheckScore"); if (score == 1) { Win.SetActive(true); } if (score == 2) { Lose.SetActive(true); } }
private void _customRenderCB_Toggled(bool prev) { if (prev) { _listView.SetSource(_scenarios); } else { _listView.Source = new ScenarioListDataSource(_scenarios); } Win.SetNeedsDisplay(); }
public override void Destroy() { Story.Completed -= Story_Completed; Win.UnRegisterNameAll(); Win.UnRegisterResource(Story); dau.KeyFrames.Clear(); dau = null; dauTranslateX.KeyFrames.Clear(); dauTranslateX = null; Story = null; }
public static Win Close(this Win win) { Stopwatch sw = new Stopwatch(); sw.Start(); do { win.Success = User32.SendMessage((IntPtr)win.Handle, 0x0010, 0, 0) == 0; }while (!win.Success && sw.ElapsedMilliseconds < timeOut); return(win); }
public void Start() { if (_settings.Levels.Count <= 0) { ChangeStage(GameStage.Finished); Win?.Invoke(); } else { Field = _settings.CreateField(_settings.Levels.Dequeue()); ChangeStage(GameStage.Playing); } }
private void CargarPartida(string ccosto) { //mostrar solo las partidas del centro de costo var oCentroCosto_Lin = new CentroCosto_Lin(); oCentroCosto_Lin.ccosto = ccosto; var LoPartidaListarDes = oCentroCosto_Lin.Listar(); LoPartidaListarDes.Insert(0, new CentroCosto_Lin.Listar { idPartida = "", partida = "-Seleccionar-" }); Win.CargarCombo(cboPartidas, LoPartidaListarDes); }
/// <summary> /// /// </summary> /// <param name="windowName"></param> /// <returns></returns> public static WindowHandle GetWindowHandle(string windowName) { var windowHanles = Win.GetAllDesktopWindows(); foreach (var item in windowHanles) { if (item.szWindowName.IndexOf(windowName) > -1) { return(item); } } throw new Exception("未找到 " + windowName + " 窗口,请打开并置顶!"); }
void OnNaviTo(DataCmd p_cmd) { if (p_cmd.Tag is Type tp) { Win win = Activator.CreateInstance(tp) as Win; if (win != null) { win.Title = p_cmd.Title; p_cmd.Tag = win; } } LoadMain(p_cmd.Tag); }
public override void Destroy() { Story.Completed -= Story_Completed; Win.UnRegisterNameAll(); Win.UnRegisterResource(Story); dauX.KeyFrames.Clear(); dauX = null; dauY.KeyFrames.Clear(); dauY = null; dauOpacty.KeyFrames.Clear(); dauOpacty = null; Story = null; }
//refrencing the C# script gameStates private void Update() { if (Flipper.Value == 1f) { GameLoad = GameTypes.wTypes.Starting; } else if (Flipper.Value == 2f) { GameLoad = GameTypes.wTypes.Playing; } else if (Flipper.Value == 3f) { GameLoad = GameTypes.wTypes.Death; } else if (Flipper.Value == 4f) { GameLoad = GameTypes.wTypes.Win; } else { print("Errrorr!!!!"); } switch (GameLoad) { case GameTypes.wTypes.Starting: Start.Invoke(); break; case GameTypes.wTypes.Playing: Play.Invoke(); break; case GameTypes.wTypes.Death: Death.Invoke(); break; case GameTypes.wTypes.Win: Win.Invoke(); break; } }
public override void Setup() { Win.Title = this.GetName(); Win.Y = 1; // menu Win.Height = Dim.Fill(1); // status bar Top.LayoutSubviews(); var menu = new MenuBar(new MenuBarItem [] { new MenuBarItem("_File", new MenuItem [] { new MenuItem("_Quit", "", () => Quit()), }) , new MenuBarItem("_View", new MenuItem [] { miShowPrivate = new MenuItem("_Include Private", "", () => ShowPrivate()) { Checked = false, CheckType = MenuItemCheckStyle.Checked }, new MenuItem("_Expand All", "", () => treeView.ExpandAll()), new MenuItem("_Collapse All", "", () => treeView.CollapseAll()) }), }); Top.Add(menu); treeView = new TreeView <object> () { X = 0, Y = 0, Width = Dim.Percent(50), Height = Dim.Fill(), }; treeView.AddObjects(AppDomain.CurrentDomain.GetAssemblies()); treeView.AspectGetter = GetRepresentation; treeView.TreeBuilder = new DelegateTreeBuilder <object> (ChildGetter, CanExpand); treeView.SelectionChanged += TreeView_SelectionChanged; Win.Add(treeView); textView = new TextView() { X = Pos.Right(treeView), Y = 0, Width = Dim.Fill(), Height = Dim.Fill() }; Win.Add(textView); }
public void checkComplete() { if (scoreCheck == 4) { Win.SetActive(true); SfxManager.sfxInstance.Audio.PlayOneShot(SfxManager.sfxInstance.Confirm); } else { TryAgainT.SetActive(true); StartCoroutine("Wait"); SfxManager.sfxInstance.Audio.PlayOneShot(SfxManager.sfxInstance.Error); } }
/// <summary> /// The new window. /// </summary> /// <param name="type"> /// The type. /// </param> /// <returns> /// The <see cref="IntPtr"/>. /// </returns> internal static IntPtr NewWindow(GtkWindowType type) { if (CefRuntime.Platform == CefRuntimePlatform.Windows) { return(Win.gtk_window_new(type)); } if (CefRuntime.Platform == CefRuntimePlatform.Linux) { return(Linux.gtk_window_new(type)); } return(IntPtr.Zero); }
public override void Setup() { Win.Title = this.GetName() + "-" + _fileName ?? "Untitled"; CreateDemoFile(_fileName); //CreateUnicodeDemoFile (_fileName); _hexView = new HexView(LoadFile()) { X = 0, Y = 0, Width = Dim.Fill(), Height = Dim.Fill(), }; _hexView.Edited += _hexView_Edited; _hexView.PositionChanged += _hexView_PositionChanged; Win.Add(_hexView); var menu = new MenuBar(new MenuBarItem [] { new MenuBarItem("_File", new MenuItem [] { new MenuItem("_New", "", () => New()), new MenuItem("_Open", "", () => Open()), new MenuItem("_Save", "", () => Save()), null, new MenuItem("_Quit", "", () => Quit()), }), new MenuBarItem("_Edit", new MenuItem [] { new MenuItem("_Copy", "", () => Copy()), new MenuItem("C_ut", "", () => Cut()), new MenuItem("_Paste", "", () => Paste()) }), new MenuBarItem("_Options", new MenuItem [] { miAllowEdits = new MenuItem("_AllowEdits", "", () => ToggleAllowEdits()) { Checked = _hexView.AllowEdits, CheckType = MenuItemCheckStyle.Checked } }) }); Top.Add(menu); statusBar = new StatusBar(new StatusItem [] { new StatusItem(Key.F2, "~F2~ Open", () => Open()), new StatusItem(Key.F3, "~F3~ Save", () => Save()), new StatusItem(Key.CtrlMask | Key.Q, "~^Q~ Quit", () => Quit()), siPositionChanged = new StatusItem(Key.Null, $"Position: {_hexView.Position} Line: {_hexView.CursorPosition.Y} Col: {_hexView.CursorPosition.X} Line length: {_hexView.BytesPerLine}", () => {}) }); Top.Add(statusBar); }
public String[] GetYomi(String src) { using (Win win = new Win()) { IntPtr hIMC = ImmGetContext(win.Handle); try { if (hIMC != IntPtr.Zero) { IntPtr hKL = GetKeyboardLayout(0); IntPtr pBuff = Marshal.AllocHGlobal(BufferSize); try { int cb = ImmGetConversionListW(hKL, hIMC, src, pBuff, BufferSize, GCL_REVERSECONVERSION); if (cb > 0) { byte[] buff = new byte[cb]; Marshal.Copy(pBuff, buff, 0, cb); MemoryStream si = new MemoryStream(buff, false); BinaryReader rr = new BinaryReader(si); uint dwSize = rr.ReadUInt32(); uint dwStyle = rr.ReadUInt32(); uint dwCount = rr.ReadUInt32(); uint dwSelection = rr.ReadUInt32(); uint dwPageStart = rr.ReadUInt32(); uint dwPageSize = rr.ReadUInt32(); List<String> al = new List<string>(); for (uint x = 0; x < dwCount; x++) { int dwOffset = Convert.ToInt32(rr.ReadUInt32()); int cx = 0; while (buff[dwOffset + cx] != 0 || buff[dwOffset + cx + 1] != 0) cx += 2; String s = Encoding.Unicode.GetString(buff, dwOffset, cx); al.Add(s); } return al.ToArray(); } } finally { Marshal.FreeHGlobal(pBuff); } } return new String[] { }; } finally { ImmReleaseContext(win.Handle, hIMC); } } }
void Start() { instance = this; float aspect = Camera.mainCamera.aspect; //Debug.Log(aspect); // Set up the menu for different aspect ratios // Aspect ratio: 1.333.. if (aspect <= 640.0f / 480.0f) { //Debug.Log("Setting up for aspect: " + aspect); // Base menu HighscoreButton.transform.localScale = new Vector2(0.7f, 0.7f); MainMenuButton.transform.localScale = new Vector2(0.9f, 0.9f); ReplaySongButton.transform.localScale = new Vector2(0.9f, 0.9f); MainMenuButton.transform.localPosition = new Vector2(MainMenuButton.transform.localPosition.x + 80, MainMenuButton.transform.localPosition.y); ReplaySongButton.transform.localPosition = new Vector2(ReplaySongButton.transform.localPosition.x - 80, ReplaySongButton.transform.localPosition.y); SongLabel.lineWidth = 600; // Login menu LoginBackButton.transform.localPosition = new Vector2(-209, 154); // Create menu CreateBackButton.transform.localPosition = new Vector2(-209, 184); // Forgot password menu ForgotBackButton.transform.localPosition = new Vector2(-220, 154); ForgotBackButton.transform.localScale = new Vector2(0.8f, 0.8f); // Scores menu SongNameLabel.lineWidth = 520; TSNames.transform.localPosition = new Vector2(30, 0); YSNames.transform.localPosition = new Vector2(30, 0); TSScores.transform.localPosition = new Vector2(-30, 0); YSScores.transform.localPosition = new Vector2(-30, 0); VerticalDivider.transform.localPosition = new Vector3(VerticalDivider.transform.localPosition.x + 30, VerticalDivider.transform.localPosition.y); HorizontalDivider.transform.localScale = new Vector2(HorizontalDivider.transform.localScale.x - 60, HorizontalDivider.transform.localScale.y); TopYoursDivider.transform.localScale = new Vector2(TopYoursDivider.transform.localScale.x - 60, TopYoursDivider.transform.localScale.y); TopScoreLabel.transform.localPosition = new Vector2(-204, 55); YourScoreLabel.transform.localPosition = new Vector2(-204, 7); TopScoreLabel.transform.localScale = new Vector2(22, 24); YourScoreLabel.transform.localScale = new Vector2(22, 24); ScoresMainMenuButton.transform.localScale = new Vector2(0.8f, 0.8f); ScoresMainMenuButton.transform.localPosition = new Vector2(ScoresMainMenuButton.transform.localPosition.x + 60, ScoresMainMenuButton.transform.localPosition.y); ScoresReplayButton.transform.localScale = new Vector2(0.8f, 0.8f); ScoresReplayButton.transform.localPosition = new Vector2(ScoresReplayButton.transform.localPosition.x - 60, ScoresReplayButton.transform.localPosition.y); } // Aspect ratio: 1.5 else if (aspect == (480.0f / 320.0f)) { //Debug.Log("Setting up for aspect: " + aspect); // Base menu HighscoreButton.transform.localScale = new Vector2(0.8f, 0.8f); MainMenuButton.transform.localPosition = new Vector2(MainMenuButton.transform.localPosition.x + 40, MainMenuButton.transform.localPosition.y); ReplaySongButton.transform.localPosition = new Vector2(ReplaySongButton.transform.localPosition.x - 40, ReplaySongButton.transform.localPosition.y); SongLabel.lineWidth = 650; // Login menu LoginBackButton.transform.localPosition = new Vector2(LoginBackButton.transform.localPosition.x + 35, LoginBackButton.transform.localPosition.y); // Create menu CreateBackButton.transform.localPosition = new Vector2(CreateBackButton.transform.localPosition.x + 35, CreateBackButton.transform.localPosition.y); // Forgot pass menu ForgotBackButton.transform.localPosition = new Vector2(ForgotBackButton.transform.localPosition.x + 35, ForgotBackButton.transform.localPosition.y); // Scores menu SongNameLabel.lineWidth = 600; TopScoreLabel.transform.localScale = new Vector2(24, 24); YourScoreLabel.transform.localScale = new Vector2(24, 24); ScoresMainMenuButton.transform.localScale = new Vector2(0.9f, 0.9f); ScoresMainMenuButton.transform.localPosition = new Vector2(ScoresMainMenuButton.transform.localPosition.x + 25, ScoresMainMenuButton.transform.localPosition.y); ScoresReplayButton.transform.localScale = new Vector2(0.9f, 0.9f); ScoresReplayButton.transform.localPosition = new Vector2(ScoresReplayButton.transform.localPosition.x - 25, ScoresReplayButton.transform.localPosition.y); } // Aspect ratio: 1.6 else if (aspect == (1280.0f / 800.0f)) { //Debug.Log("Setting up for aspect: " + aspect); // Base menu HighscoreButton.transform.localScale = new Vector2(0.9f, 0.9f); MainMenuButton.transform.localPosition = new Vector2(MainMenuButton.transform.localPosition.x + 25, MainMenuButton.transform.localPosition.y); ReplaySongButton.transform.localPosition = new Vector2(ReplaySongButton.transform.localPosition.x - 25, ReplaySongButton.transform.localPosition.y); // Login menu LoginBackButton.transform.localPosition = new Vector2(LoginBackButton.transform.localPosition.x + 25, LoginBackButton.transform.localPosition.y); // Create menu CreateBackButton.transform.localPosition = new Vector2(CreateBackButton.transform.localPosition.x + 25, CreateBackButton.transform.localPosition.y); // Forgot back menu ForgotBackButton.transform.localPosition = new Vector2(ForgotBackButton.transform.localPosition.x + 25, ForgotBackButton.transform.localPosition.y); // Scores menu ScoresMainMenuButton.transform.localScale = new Vector2(0.9f, 0.9f); ScoresMainMenuButton.transform.localPosition = new Vector2(ScoresMainMenuButton.transform.localPosition.x + 10, ScoresMainMenuButton.transform.localPosition.y); ScoresReplayButton.transform.localScale = new Vector2(0.9f, 0.9f); ScoresReplayButton.transform.localPosition = new Vector2(ScoresReplayButton.transform.localPosition.x - 10, ScoresReplayButton.transform.localPosition.y); } // Aspect ratio: 1.666.. (Default android) else if (aspect == (800.0f / 480.0f)) { // Default. Doesn't need to change. } // Aspect ratio: 1.7066.. else if (aspect == (1024.0f / 600.0f)) { // Using the same as 1.666.. (Default) } // Aspect ratio: 1.779166.. else if (aspect == (854.0f / 480.0f)) { // Using the same as 1.666.. (Default) } // Aspect ratio: 1.8 else if (aspect == (432.0f / 240.0f)) { // Using the same as 1.666.. (Default) } SongLabel.text = AudioManager.artist + " - " + AudioManager.title; CalculateSongLabelSize(); HitsValueLabel.text = Player.TotalKills.ToString(); MissesValueLabel.text = (EnemySpawnScript.spawnCount - Player.TotalKills).ToString(); ScoreValueLabel.text = Player.score.ToString(); RetryScoreValueLabel.text = ScoreValueLabel.text; RankValueLabel.text = CalculatedRank; RetryRankValueLabel.text = RankValueLabel.text; if (Game.Cheated) { HighscoreButton.enabled = false; HighscoreButton.GetComponentInChildren<UILabel>().text = "[FF2222]You cheater!"; } UITools.SetActiveState(RetrySubmitPanel, false); }
/// <summary> /// Create a new GraphicsWindow. /// </summary> /// <returns>An id for the created window.</returns> public static Primitive Create() { Win win; if (Wins.Count == 0) { win = new Win(newID()); Wins.Add(win); } else { win = getWin(currentWin); } if (null != win) { win.Save(); } win = new Win(newID()); currentWin = win.id; Wins.Add(win); return currentWin; }