/// <summary> /// Draw item. /// </summary> public override void Draw() { base.Draw(); string caption = CurrentListItem; float offset = Screen.GetTextWidth(caption, _itemText.Font, _itemText.Scale); _itemText.Color = Enabled ? Selected ? Color.Black : Color.WhiteSmoke : Color.FromArgb(163, 159, 148); _itemText.Caption = caption; _arrowLeft.Color = Enabled ? Selected ? Color.Black : Color.WhiteSmoke : Color.FromArgb(163, 159, 148); _arrowRight.Color = Enabled ? Selected ? Color.Black : Color.WhiteSmoke : Color.FromArgb(163, 159, 148); _arrowLeft.Position = new Point(375 - (int)offset + Offset.X + Parent.WidthOffset, _arrowLeft.Position.Y); if (Selected) { _arrowLeft.Draw(); _arrowRight.Draw(); _itemText.Position = new Point(403 + Offset.X + Parent.WidthOffset, _itemText.Position.Y); } else { _itemText.Position = new Point(418 + Offset.X + Parent.WidthOffset, _itemText.Position.Y); } _itemText.Draw(); }
/// <summary> /// Draw item. /// </summary> public override void Draw() { base.Draw(); string caption = _items[Index].ToString(); int offset = StringMeasurer.MeasureString(caption); _itemText.Color = Enabled ? Selected ? UnknownColors.Black : UnknownColors.WhiteSmoke : Color.FromArgb(163, 159, 148); _itemText.Caption = caption; _arrowLeft.Color = Enabled ? Selected ? UnknownColors.Black : UnknownColors.WhiteSmoke : Color.FromArgb(163, 159, 148); _arrowRight.Color = Enabled ? Selected ? UnknownColors.Black : UnknownColors.WhiteSmoke : Color.FromArgb(163, 159, 148); _arrowLeft.Position = new PointF(375 - offset + Offset.X + Parent.WidthOffset, _arrowLeft.Position.Y); if (Selected) { _arrowLeft.Draw(); _arrowRight.Draw(); _itemText.Position = new PointF(405 + Offset.X + Parent.WidthOffset, (int)_itemText.Position.Y); } else { _itemText.Position = new PointF(420 + Offset.X + Parent.WidthOffset, (int)_itemText.Position.Y); } _itemText.Draw(); }
public override void Draw(int interval) { SizeF res = UIMenu.GetScreenResolutionMaintainRatio(); Point safe = UIMenu.GetSafezoneBounds(); base.Draw(interval); UIResText.Draw(Text, (int)res.Width - safe.X - 10, (int)res.Height - safe.Y - (42 + (4 * interval)), Font.ChaletLondon, 0.5f, Color.White, UIResText.Alignment.Right, false, false, 0); }
public virtual void Draw(int interval) { SizeF res = UIMenu.GetScreenResolutionMaintainRatio(); Point safe = UIMenu.GetSafezoneBounds(); UIResText.Draw(Label, (int)res.Width - safe.X - 180, (int)res.Height - safe.Y - (30 + (4 * interval)), Font.ChaletLondon, 0.3f, Color.White, UIResText.Alignment.Right, false, false, 0); Sprite.Draw("timerbars", "all_black_bg", (int)res.Width - safe.X - 298, (int)res.Height - safe.Y - (40 + (4 * interval)), 300, 37, 0f, Color.FromArgb(180, 255, 255, 255)); UI.HideHudComponentThisFrame(HudComponent.AreaName); UI.HideHudComponentThisFrame(HudComponent.StreetName); UI.HideHudComponentThisFrame(HudComponent.VehicleName); }
private Color _disabledColor = Color.FromArgb(163, 159, 148); // Why allocating memory for same color every time? /// <summary> /// Draw this item. /// </summary> public virtual void Draw() { _rectangle.Size = new Size(431 + Parent.WidthOffset, 38); _selectedSprite.Size = new Size(431 + Parent.WidthOffset, 38); if (Hovered && !Selected) { //_rectangle.Color = Color.FromArgb(20, 255, 255, 255); // Why setting color every time? (I set it in ctor) _rectangle.Draw(); } if (Selected) { _selectedSprite.Draw(); } _text.Color = Enabled ? (Selected ? Color.Black : Color.WhiteSmoke) : _disabledColor; // No alloc anymore there if (LeftBadge == BadgeStyle.None) { _text.Position = new PointF(8 + Offset.X, _text.Position.Y); } else { _text.Position = new PointF(35 + Offset.X, _text.Position.Y); // TODO _badgeLeft.TextureDict = BadgeToSpriteLib(LeftBadge); // TODO _badgeLeft.TextureName = BadgeToSpriteName(LeftBadge, Selected); _badgeLeft.Color = BadgeToColor(LeftBadge, Selected); _badgeLeft.Draw(); } if (RightBadge != BadgeStyle.None) { _badgeRight.Position = new PointF(385 + Offset.X + Parent.WidthOffset, _badgeRight.Position.Y); // TODO _badgeRight.TextureDict = BadgeToSpriteLib(RightBadge); // TODO _badgeRight.TextureName = BadgeToSpriteName(RightBadge, Selected); _badgeRight.Color = BadgeToColor(RightBadge, Selected); _badgeRight.Draw(); } if (!String.IsNullOrWhiteSpace(RightLabel)) { _labelText.Position = new PointF(420 + Offset.X + Parent.WidthOffset, _labelText.Position.Y); _labelText.Caption = RightLabel; _labelText.Color = _text.Color = Enabled ? (Selected ? Color.Black : Color.WhiteSmoke) : _disabledColor; // No alloc anymore there _labelText.Draw(); } _text.Draw(); }
internal async override Task Draw() { if (Enabled) { Background.Size = new Size(431 + ParentItem.Parent.WidthOffset, 76); Background.Draw(); BackgroundBar.Draw(); ActiveBar.Draw(); Min.Draw(); Max.Draw(); Title.Draw(); Functions(); } await Task.FromResult(0); }
internal async override Task Draw() { if (!Enabled) { return; } Background.Size = new Size(431 + ParentItem.Parent.WidthOffset, 275); Background.Draw(); Grid.Draw(); Circle.Draw(); Left.Draw(); Right.Draw(); Functions(); await Task.FromResult(0); }
/// <summary> /// Draw this item. /// </summary> public virtual void Draw() { _rectangle.Size = new Size(431 + Parent.WidthOffset, 38); _selectedSprite.Size = new Size(431 + Parent.WidthOffset, 38); if (Hovered && !Selected) { _rectangle.Color = Color.FromArgb(20, 255, 255, 255); _rectangle.Draw(); } if (Selected) { _selectedSprite.Draw(); } _text.Color = Enabled ? Selected ? Color.Black : Color.WhiteSmoke : Color.FromArgb(163, 159, 148); if (LeftBadge != BadgeStyle.None) { _text.Position = new Point(35 + Offset.X, (int)_text.Position.Y); _badgeLeft.TextureDict = BadgeToSpriteLib(LeftBadge); _badgeLeft.TextureName = BadgeToSpriteName(LeftBadge, Selected); _badgeLeft.Color = BadgeToColor(LeftBadge, Selected); _badgeLeft.Draw(); } else { _text.Position = new Point(8 + Offset.X, (int)_text.Position.Y); } if (RightBadge != BadgeStyle.None) { _badgeRight.Position = new Point(385 + Offset.X + Parent.WidthOffset, _badgeRight.Position.Y); _badgeRight.TextureDict = BadgeToSpriteLib(RightBadge); _badgeRight.TextureName = BadgeToSpriteName(RightBadge, Selected); _badgeRight.Color = BadgeToColor(RightBadge, Selected); _badgeRight.Draw(); } if (!String.IsNullOrWhiteSpace(RightLabel)) { _labelText.Position = new Point(420 + Offset.X + Parent.WidthOffset, (int)_labelText.Position.Y); _labelText.Caption = RightLabel; _labelText.Color = _text.Color = Enabled ? Selected ? Color.Black : Color.WhiteSmoke : Color.FromArgb(163, 159, 148); _labelText.Draw(); } _text.Draw(); }
internal async override Task Draw() { if (Enabled) { Background.Size = new Size(431 + ParentItem.Parent.WidthOffset, 112); Background.Draw(); if (EnableArrow) { LeftArrow.Draw(); RightArrow.Draw(); } Text.Draw(); for (int Index = 0; Index < Bar.Count; Index++) { Bar[Index].Draw(); } SelectedRectangle.Draw(); Functions(); } await Task.FromResult(0); }
/// <summary> /// Draw item. /// </summary> public override void Draw() { base.Draw(); _valueText.Position = new Point(370 + Offset.X + Parent.WidthOffset, _valueText.Position.Y); _leftArrow.Position = Point.Subtract(_valueText.Position, new Size(60, 0)); _rightArrow.Position = Point.Add(_valueText.Position, new Size(30, 0)); _valueText.Caption = Value.ToString(); _valueText.Draw(); if (Value != Minimum) { _leftArrow.Draw(); } if (Value != Maximum) { _rightArrow.Draw(); } }
/// <summary> /// Draw this item. /// </summary> public virtual void Draw() { //if (this is UIMenuHeritageCardItem) //{ // //if (Selected) // //{ // // Selected = false; // // if (Parent.CurrentSelection == 0) // // { // // Parent.CurrentSelection++; //= Parent.MenuItems.Count + 2; // // } // // //else if (Parent.CurrentSelection == Parent.MenuItems.Count - 1) // // //{ // // // Parent.CurrentSelection = Parent.MenuItems.Count - 1; // // //} // //} // _rectangle.Size = new SizeF(431 + Parent.WidthOffset, 38 + 150); // _selectedSprite.Size = new SizeF(431 + Parent.WidthOffset, 38 + 150); //} //else //{ //bool heritage = false; //foreach (var m in this.Parent.MenuItems) //{ // if (m is UIMenuHeritageCardItem) // { // heritage = true; // break; // } //} //if (heritage) //{ // //this.Position(150); // this.Offset = new PointF(this.Offset.X, 228f); // //this.Offset.Y + 150f; //} _rectangle.Size = new SizeF(431 + Parent.WidthOffset, 38); _selectedSprite.Size = new SizeF(431 + Parent.WidthOffset, 38); //} if (Hovered && !Selected) { //_rectangle.Color = Color.FromArgb(20, 255, 255, 255); // Why setting color every time? (I set it in ctor) _rectangle.Draw(); } if (Selected) { _selectedSprite.Draw(); } _text.Color = Enabled ? (Selected ? UnknownColors.Black : UnknownColors.WhiteSmoke) : _disabledColor; // No alloc anymore there if (LeftBadge == BadgeStyle.None) { _text.Position = new PointF(8 + Offset.X, _text.Position.Y); } else { _text.Position = new PointF(35 + Offset.X, _text.Position.Y); _badgeLeft.TextureDict = BadgeToSpriteLib(LeftBadge); _badgeLeft.TextureName = BadgeToSpriteName(LeftBadge, Selected); _badgeLeft.Color = BadgeToColor(LeftBadge, Selected); _badgeLeft.Draw(); } if (RightBadge != BadgeStyle.None) { _badgeRight.Position = new PointF(385 + Offset.X + Parent.WidthOffset, _badgeRight.Position.Y); _badgeRight.TextureDict = BadgeToSpriteLib(RightBadge); _badgeRight.TextureName = BadgeToSpriteName(RightBadge, Selected); _badgeRight.Color = BadgeToColor(RightBadge, Selected); _badgeRight.Draw(); } if (!String.IsNullOrWhiteSpace(RightLabel)) { _labelText.Position = new PointF(420 + Offset.X + Parent.WidthOffset, _labelText.Position.Y); _labelText.Caption = RightLabel; _labelText.Color = _text.Color = Enabled ? (Selected ? UnknownColors.Black : UnknownColors.WhiteSmoke) : _disabledColor; // No alloc anymore there _labelText.Draw(); } if (!String.IsNullOrWhiteSpace(_text.Caption.Trim())) { _text.Draw(); } }
/// <summary> /// Draw this item. /// </summary> public virtual async Task Draw() { // Removed because of Progress Item height calculations //_rectangle.Size = new SizeF(431 + Parent.WidthOffset, 38); //_selectedSprite.Size = new SizeF(431 + Parent.WidthOffset, 38); if (Hovered && !Selected) { _rectangle.Draw(); } if (Selected) { _selectedSprite.Color = HighlightColor; _selectedSprite.Draw(); } else { _selectedSprite.Color = MainColor; _selectedSprite.Draw(); } _text.Color = Enabled ? (Selected ? HighlightedTextColor : TextColor) : _disabledColor; // No alloc anymore there if (LeftBadge == BadgeStyle.None) { _text.Position = new PointF(8 + Offset.X, _text.Position.Y); } else { _text.Position = new PointF(35 + Offset.X, _text.Position.Y); _badgeLeft.TextureDict = BadgeToSpriteLib(LeftBadge); _badgeLeft.TextureName = BadgeToSpriteName(LeftBadge, Selected); _badgeLeft.Color = BadgeToColor(LeftBadge, Selected); _badgeLeft.Draw(); } if (RightBadge != BadgeStyle.None) { _badgeRight.Position = new PointF(385 + Offset.X + Parent.WidthOffset, _badgeRight.Position.Y); _badgeRight.TextureDict = BadgeToSpriteLib(RightBadge); _badgeRight.TextureName = BadgeToSpriteName(RightBadge, Selected); _badgeRight.Color = BadgeToColor(RightBadge, Selected); _badgeRight.Draw(); } if (!String.IsNullOrWhiteSpace(RightLabel)) { if (RightBadge == BadgeStyle.None) { _labelText.Position = new PointF(420 + Offset.X + Parent.WidthOffset, _labelText.Position.Y); } else { _labelText.Position = new PointF(390 + Offset.X + Parent.WidthOffset, _labelText.Position.Y); } _labelText.Caption = RightLabel; _labelText.Color = _text.Color = Enabled ? (Selected ? Colors.Black : Colors.WhiteSmoke) : _disabledColor; // No alloc anymore there _labelText.Draw(); } _text.Draw(); }
public void tick(int index) { int tick = DateTime.Now.Second; if (Directory.Exists(image)) { #region future //month display img = displaymonth((Deloreanlist[index].fmonth1 * 10) + Deloreanlist[index].fmonth2, time.Future); if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 27, loc.Y + 65), new Size(88, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //Day display img = displaymunber(Deloreanlist[index].fday1, time.Future); if (File.Exists(image + "\\day\\1" + img)) { Sprite.DrawTexture(image + "\\day\\1" + img, new Point(loc.X + 140, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fday2, time.Future); if (File.Exists(image + "\\day\\2" + img)) { Sprite.DrawTexture(image + "\\day\\2" + img, new Point(loc.X + 166, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //yeardisplay img = displaymunber(Deloreanlist[index].fy1, time.Future); if (File.Exists(image + "\\year\\1" + img)) { Sprite.DrawTexture(image + "\\year\\1" + img, new Point(loc.X + 220, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fy2, time.Future); if (File.Exists(image + "\\year\\2" + img)) { Sprite.DrawTexture(image + "\\year\\2" + img, new Point(loc.X + 249, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fy3, time.Future); if (File.Exists(image + "\\year\\3" + img)) { Sprite.DrawTexture(image + "\\year\\3" + img, new Point(loc.X + 278, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fy4, time.Future); if (File.Exists(image + "\\year\\4" + img)) { Sprite.DrawTexture(image + "\\year\\4" + img, new Point(loc.X + 307, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } int h1 = 1, h2 = 2; if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 0) { h1 = 1; h2 = 2; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 1) { h1 = 0; h2 = 1; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 2) { h1 = 0; h2 = 2; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 3) { h1 = 0; h2 = 3; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 4) { h1 = 0; h2 = 4; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 5) { h1 = 0; h2 = 5; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 6) { h1 = 0; h2 = 6; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 7) { h1 = 0; h2 = 7; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 8) { h1 = 0; h2 = 8; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 9) { h1 = 0; h2 = 9; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 10) { h1 = 1; h2 = 0; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 11) { h1 = 1; h2 = 1; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 12) { h1 = 1; h2 = 2; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 13) { h1 = 0; h2 = 1; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 14) { h1 = 0; h2 = 2; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 15) { h1 = 0; h2 = 3; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 16) { h1 = 0; h2 = 4; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 17) { h1 = 0; h2 = 5; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 18) { h1 = 0; h2 = 6; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 19) { h1 = 0; h2 = 7; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 20) { h1 = 0; h2 = 8; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 21) { h1 = 0; h2 = 9; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 22) { h1 = 1; h2 = 0; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 23) { h1 = 1; h2 = 1; } //hour display img = displaymunber(h1, time.Future); if (File.Exists(image + "\\hour\\1" + img)) { Sprite.DrawTexture(image + "\\hour\\1" + img, new Point(loc.X + 366, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(h2, time.Future); if (File.Exists(image + "\\hour\\2" + img)) { Sprite.DrawTexture(image + "\\hour\\2" + img, new Point(loc.X + 388, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) > 12) { Deloreanlist[index].fampm = "pm"; } else { Deloreanlist[index].fampm = "am"; } //ampm img = "\\red " + Deloreanlist[index].fampm + ".jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 340, loc.Y + 36), new Size(20, 28)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //tick if (tick != temptick) { if (ticktock) { ticktock = false; } else { ticktock = true; } temptick = tick; } else { if (ticktock) { img = "\\red colon on.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 427, loc.Y + 65), new Size(10, 14)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } else { img = "\\red colon off.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 427, loc.Y + 65), new Size(10, 14)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } } //minute display img = displaymunber(Deloreanlist[index].fm1, time.Future); if (File.Exists(image + "\\min\\1" + img)) { Sprite.DrawTexture(image + "\\min\\1" + img, new Point(loc.X + 447, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fm2, time.Future); if (File.Exists(image + "\\min\\2" + img)) { Sprite.DrawTexture(image + "\\min\\2" + img, new Point(loc.X + 474, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #endregion #region present img = displaymonth((Deloreanlist[index].presmonth1 * 10) + Deloreanlist[index].presmonth2, time.Present); if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 27, loc.Y + 157), new Size(88, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //Day display img = displaymunber(Deloreanlist[index].presday1, time.Present); if (File.Exists(image + "\\day\\1" + img)) { Sprite.DrawTexture(image + "\\day\\1" + img, new Point(loc.X + 140, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presday2, time.Present); if (File.Exists(image + "\\day\\2" + img)) { Sprite.DrawTexture(image + "\\day\\2" + img, new Point(loc.X + 166, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //yeardisplay img = displaymunber(Deloreanlist[index].presy1, time.Present); if (File.Exists(image + "\\year\\1" + img)) { Sprite.DrawTexture(image + "\\year\\1" + img, new Point(loc.X + 220, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presy2, time.Present); if (File.Exists(image + "\\year\\2" + img)) { Sprite.DrawTexture(image + "\\year\\2" + img, new Point(loc.X + 249, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presy3, time.Present); if (File.Exists(image + "\\year\\3" + img)) { Sprite.DrawTexture(image + "\\year\\3" + img, new Point(loc.X + 278, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presy4, time.Present); if (File.Exists(image + "\\year\\4" + img)) { Sprite.DrawTexture(image + "\\year\\4" + img, new Point(loc.X + 307, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } Deloreanlist[index].presampm = "am"; int hour = World.CurrentDayTime.Hours; if (hour == 0) { h1 = 1; h2 = 2; } else if (hour == 1) { h1 = 0; h2 = 1; } else if (hour == 2) { h1 = 0; h2 = 2; } else if (hour == 3) { h1 = 0; h2 = 3; } else if (hour == 4) { h1 = 0; h2 = 4; } else if (hour == 5) { h1 = 0; h2 = 5; } else if (hour == 6) { h1 = 0; h2 = 6; } else if (hour == 7) { h1 = 0; h2 = 7; } else if (hour == 8) { h1 = 0; h2 = 8; } else if (hour == 9) { h1 = 0; h2 = 9; } else if (hour == 10) { h1 = 1; h2 = 0; } else if (hour == 11) { h1 = 1; h2 = 1; } else if (hour == 12) { h1 = 1; h2 = 2; } else if (hour == 13) { h1 = 0; h2 = 1; } else if (hour == 14) { h1 = 0; h2 = 2; } else if (hour == 15) { h1 = 0; h2 = 3; } else if (hour == 16) { h1 = 0; h2 = 4; } else if (hour == 17) { h1 = 0; h2 = 5; } else if (hour == 18) { h1 = 0; h2 = 6; } else if (hour == 19) { h1 = 0; h2 = 7; } else if (hour == 20) { h1 = 0; h2 = 8; } else if (hour == 21) { h1 = 0; h2 = 9; } else if (hour == 22) { h1 = 1; h2 = 0; } else if (hour == 23) { h1 = 1; h2 = 1; } if (hour > 12) { Deloreanlist[index].fampm = "pm"; } else { Deloreanlist[index].fampm = "am"; } //ampm img = "\\green " + Deloreanlist[index].presampm + ".jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 340, loc.Y + 157), new Size(20, 32)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //hour display img = displaymunber(h1, time.Present); if (File.Exists(image + "\\hour\\1" + img)) { Sprite.DrawTexture(image + "\\hour\\1" + img, new Point(loc.X + 366, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(h2, time.Present); if (File.Exists(image + "\\hour\\2" + img)) { Sprite.DrawTexture(image + "\\hour\\2" + img, new Point(loc.X + 388, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //tick if (tick != temptick) { if (ticktock) { ticktock = false; } else { ticktock = true; } temptick = tick; } else { if (ticktock) { img = "\\green colon on.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 427, loc.Y + 157), new Size(10, 14)); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Grille, 0, true); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } else { img = "\\green colon off.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 427, loc.Y + 157), new Size(10, 14)); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Grille, -1, true); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } } //minute display int presmin = World.CurrentDayTime.Minutes; if (presmin < 10) { Deloreanlist[index].presm1 = 0; Deloreanlist[index].presm2 = presmin; } else { if (presmin < 20) { Deloreanlist[index].presm1 = 1; Deloreanlist[index].presm2 = presmin - 10; } else if (presmin < 30) { Deloreanlist[index].presm1 = 2; Deloreanlist[index].presm2 = presmin - 20; } else if (presmin < 40) { Deloreanlist[index].presm1 = 3; Deloreanlist[index].presm2 = presmin - 30; } else if (presmin < 50) { Deloreanlist[index].presm1 = 4; Deloreanlist[index].presm2 = presmin - 40; } else if (presmin < 60) { Deloreanlist[index].presm1 = 5; Deloreanlist[index].presm2 = presmin - 50; } } img = displaymunber(Deloreanlist[index].presm1, time.Present); if (File.Exists(image + "\\min\\1" + img)) { Sprite.DrawTexture(image + "\\min\\1" + img, new Point(loc.X + 447, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presm2, time.Present); if (File.Exists(image + "\\min\\2" + img)) { Sprite.DrawTexture(image + "\\min\\2" + img, new Point(loc.X + 474, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #endregion #region past //month display img = displaymonth((Deloreanlist[index].pastmonth1 * 10) + Deloreanlist[index].pastmonth2, time.Past); if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 27, loc.Y + 243), new Size(88, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //Day display img = displaymunber(Deloreanlist[index].pastday1, time.Past); if (File.Exists(image + "\\day\\1" + img)) { Sprite.DrawTexture(image + "\\day\\1" + img, new Point(loc.X + 140, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pastday2, time.Past); if (File.Exists(image + "\\day\\2" + img)) { Sprite.DrawTexture(image + "\\day\\2" + img, new Point(loc.X + 166, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //yeardisplay img = displaymunber(Deloreanlist[index].pasty1, time.Past); if (File.Exists(image + "\\year\\1" + img)) { Sprite.DrawTexture(image + "\\year\\1" + img, new Point(loc.X + 220, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pasty2, time.Past); if (File.Exists(image + "\\year\\2" + img)) { Sprite.DrawTexture(image + "\\year\\2" + img, new Point(loc.X + 249, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pasty3, time.Past); if (File.Exists(image + "\\year\\3" + img)) { Sprite.DrawTexture(image + "\\year\\3" + img, new Point(loc.X + 278, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pasty4, time.Past); if (File.Exists(image + "\\year\\4" + img)) { Sprite.DrawTexture(image + "\\year\\4" + img, new Point(loc.X + 307, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //ampm img = "\\amber " + Deloreanlist[index].pastampm + ".jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 340, loc.Y + 243), new Size(20, 32)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //hour display img = displaymunber(Deloreanlist[index].pasth1, time.Past); if (File.Exists(image + "\\hour\\1" + img)) { Sprite.DrawTexture(image + "\\hour\\1" + img, new Point(loc.X + 366, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pasth2, time.Past); if (File.Exists(image + "\\hour\\2" + img)) { Sprite.DrawTexture(image + "\\hour\\2" + img, new Point(loc.X + 388, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //tick if (tick != temptick) { if (ticktock) { ticktock = false; } else { ticktock = true; } temptick = tick; } else { if (ticktock) { img = "\\amber colon on.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 427, loc.Y + 243), new Size(10, 17)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } else { img = "\\amber colon off.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 427, loc.Y + 243), new Size(10, 17)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } } //minute display img = displaymunber(Deloreanlist[index].pastm1, time.Past); if (File.Exists(image + "\\min\\1" + img)) { Sprite.DrawTexture(image + "\\min\\1" + img, new Point(loc.X + 447, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pastm2, time.Past); if (File.Exists(image + "\\min\\2" + img)) { Sprite.DrawTexture(image + "\\min\\2" + img, new Point(loc.X + 474, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #endregion } else { if (!Deloreanlist[index].refilltimecurcuits) { UIResText Mrfusion = new UIResText("Empty", new Point(1600, 900), (float)0.6, Color.Orange); Mrfusion.Draw(); } UIResText Timedisplayf = new UIResText(Deloreanlist[index].timedisplayfuture(), new Point(1450, 940), (float)0.6, Color.Red); UIResText Timedisplaypres = new UIResText(Deloreanlist[index].timedisplaypresent(), new Point(1450, 980), (float)0.6, Color.Green); UIResText Timedisplaypast = new UIResText(Deloreanlist[index].timedisplaypast(), new Point(1450, 1020), (float)0.6, Color.Yellow); Timedisplayf.DropShadow = true; Timedisplaypres.DropShadow = true; Timedisplaypast.DropShadow = true; Timedisplayf.Draw(); Timedisplaypres.Draw(); Timedisplaypast.Draw(); } }
void Deloreonfunctioning(int index) { #region functions display_background(); UIResText Deloreanlistnum = new UIResText("Number of Time Machines: " + Deloreanlist.Count.ToString(), new Point(loc.X, loc.Y - 50), (float)0.6, Color.Red); Deloreanlistnum.Draw(); UIResText Deloreanspeed = new UIResText("Speed: " + (int)((Deloreanlist[index].Deloreon.Speed / .27777) / 1.60934), new Point(loc.X, loc.Y - 130), (float)0.6, Color.Red); Deloreanspeed.Draw(); UIResText Deloreanpos = new UIResText(Deloreanlist[index].Deloreon.Rotation.ToString(), new Point(500, loc.Y - 130), (float)0.6, Color.Red); if (!Deloreanlist[index].engineturningon) { if (!Deloreanlist[index].engineison) { if (!Deloreanlist[index].RCmode) { //engineon.Play(); Deloreanlist[index].Deloreon.EngineRunning = true; } Deloreanlist[index].engineison = true; Deloreanlist[index].engineturningon = true; Deloreanlist[index].ifwentoutoffcar = false; Function.Call(Hash.SET_VEHICLE_ENGINE_ON, Game.Player.Character.CurrentVehicle, true); } } if (!Game.Player.Character.CurrentVehicle.IsDriveable) { if (!Deloreanlist[index].carjustdied) { Deloreanlist[index].carjustdied = true; trend.Play(); setfordeletion(Deloreanlist[index].Deloreon); Deloreanlist[index].Deloreon.IsPersistent = false; Deloreanlist[index].Deloreon = null; Game.Player.Character.CurrentVehicle.Detach(); Deloreanlist[index].ifwentoutoffcar = true; Deloreanlist.Remove(Deloreanlist[index]); } } if (Deloreanlist[index].refilltimecurcuits) { if (runoncefeul) { if (Mrfusionrefilltimer.getdelay() >= 3) { Mrfusionrefilltimer.Stop(); Mrfusionrefilltimer.Reset(); inputonfeul.Play(); Function.Call(Hash.SET_VEHICLE_MOD_KIT, Deloreanlist[index].Deloreon.Handle, 0); Deloreanlist[index].Deloreon.SetMod(VehicleMod.FrontBumper, 0, true); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Roof, -1, true); runoncefeul = false; } } if (Mrfusionrefilltimer.getdelay() < 3) { if (!Deloreanlist[index].toggletimecurcuits) { if (!freezestarted) { Function.Call(Hash.SET_VEHICLE_MOD_KIT, Deloreanlist[index].Deloreon.Handle, 0); Deloreanlist[index].Deloreon.SetMod(VehicleMod.FrontBumper, -1, true); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Roof, -1, true); } } } } else { if (!freezestarted) { Function.Call(Hash.SET_VEHICLE_MOD_KIT, Deloreanlist[index].Deloreon.Handle, 0); Deloreanlist[index].Deloreon.SetMod(VehicleMod.FrontBumper, -1, true); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Roof, -1, true); } } #endregion if (Deloreanlist[index].toggletimecurcuits) { //timedisplay Function.Call(Hash.SET_VEHICLE_MOD_KIT, Deloreanlist[index].Deloreon.Handle, 0); Deloreanlist[index].Deloreon.SetMod(VehicleMod.SideSkirt, 0, true); //Function.Call(Hash.SET_VEHICLE_EXTRA, new InputArgument[] { TimeTravel.instantDelorean.Deloreanlist[index].Deloreon, 8, 0 }); tick(index); int tempspeed = (int)((Deloreanlist[index].Deloreon.Speed / .27777) / 1.60934); if (tempspeed > 84 && tempspeed < 88) { sparkprotect = true; if (!below84) { Function.Call(Hash.SET_VEHICLE_MOD_KIT, Deloreanlist[index].Deloreon.Handle, 0); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Spoilers, 0, true); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Frame, 5, true); if (Deloreanlist[index].refilltimecurcuits) make_effect("scr_martin1", "scr_sol1_sniper_impact", index); } World.DrawLightWithRange(Deloreanlist[index].Deloreon.GetOffsetInWorldCoords(new Vector3(0, (float)2.2, (float)0.5)), Color.DodgerBlue, (float)1.2, 400); if (!Deloreanlist[index].past84) { if (Deloreanlist[index].refilltimecurcuits) { sparksfeul.PlayLooping(); delay.Start(); Deloreanlist[index].Deloreon.IsInvincible = true; Deloreanlist[index].Deloreon.CanBeVisiblyDamaged = false; } else { sparks.PlayLooping(); } Deloreanlist[index].past84 = true; } } else if (tempspeed >= 88) { if (!below84) { Function.Call(Hash.SET_VEHICLE_MOD_KIT, Deloreanlist[index].Deloreon.Handle, 0); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Spoilers, 0, true); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Frame, 5, true); if (Deloreanlist[index].refilltimecurcuits) make_effect("scr_martin1", "scr_sol1_sniper_impact", index); } World.DrawLightWithRange(Deloreanlist[index].Deloreon.GetOffsetInWorldCoords(new Vector3(0, (float)2.2, (float)0.5)), Color.DodgerBlue, (float)1.2, 400); if (Deloreanlist[index].refilltimecurcuits) { if (delay.getdelay() < 5) { if (delay.getdelay() > 2) { } } else { if (Function.Call<int>(Hash.GET_FOLLOW_VEHICLE_CAM_VIEW_MODE) == 4) { Deloreanlist[index].timetravelentry(); Timetravelreentery.Play(); Ped[] peds = World.GetNearbyPeds(Game.Player.Character, 1000); Vehicle[] pedVehicles = World.GetNearbyVehicles(Game.Player.Character, 1000); for (int i = 0; i < peds.Length; i++) { if (peds[i] != Game.Player.Character) GTA.Native.Function.Call(GTA.Native.Hash.SET_ENTITY_COORDS_NO_OFFSET, peds[i], 0, 0, 0, 0, 0, 1); } Array.Clear(peds, 0, peds.Length); for (int i = 0; i < pedVehicles.Length; i++) { if (pedVehicles[i] != Game.Player.Character.CurrentVehicle) GTA.Native.Function.Call(GTA.Native.Hash.SET_ENTITY_COORDS_NO_OFFSET, pedVehicles[i], 0, 0, 0, 0, 0, 1); } Array.Clear(pedVehicles, 0, pedVehicles.Length); //End Ped Despawning GTA.Native.Function.Call(GTA.Native.Hash.SET_RANDOM_WEATHER_TYPE); //Function.Call(Hash.SET_CLOCK_DATE, Deloreanlist[index].getmonth(), Deloreanlist[index].getday(), Deloreanlist[index].getyear()); Function.Call(Hash.SET_CLOCK_TIME, ((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2), Deloreanlist[index].getminute(), 0); Game.Player.WantedLevel = 0; Player_time_class.pastday1 = Deloreanlist[index].pastday1; Player_time_class.pastday2 = Deloreanlist[index].pastday2; Player_time_class.pastmonth1 = Deloreanlist[index].pastmonth1; Player_time_class.pastmonth2 = Deloreanlist[index].pastmonth2; Player_time_class.pasty1 = Deloreanlist[index].pasty1; Player_time_class.pasty2 = Deloreanlist[index].pasty2; Player_time_class.pasty3 = Deloreanlist[index].pasty3; Player_time_class.pasty4 = Deloreanlist[index].pasty4; Player_time_class.pasth1 = Deloreanlist[index].pasth1; Player_time_class.pasth2 = Deloreanlist[index].pasth2; Player_time_class.pastm1 = Deloreanlist[index].pastm1; Player_time_class.pastm2 = Deloreanlist[index].pastm2; Player_time_class.pastampm = Deloreanlist[index].pastampm; Player_time_class.presday1 = Deloreanlist[index].presday1; Player_time_class.presday2 = Deloreanlist[index].presday2; Player_time_class.presmonth1 = Deloreanlist[index].presmonth1; Player_time_class.presmonth2 = Deloreanlist[index].presmonth2; Player_time_class.presy1 = Deloreanlist[index].presy1; Player_time_class.presy2 = Deloreanlist[index].presy2; Player_time_class.presy3 = Deloreanlist[index].presy3; Player_time_class.presy4 = Deloreanlist[index].presy4; Player_time_class.presh1 = Deloreanlist[index].presh1; Player_time_class.presh2 = Deloreanlist[index].presh2; Player_time_class.presm1 = Deloreanlist[index].presm1; Player_time_class.presm2 = Deloreanlist[index].presm2; Player_time_class.presampm = Deloreanlist[index].presampm; Player_time_class.fday1 = Deloreanlist[index].fday1; Player_time_class.fday2 = Deloreanlist[index].fday2; Player_time_class.fmonth1 = Deloreanlist[index].fmonth1; Player_time_class.fmonth2 = Deloreanlist[index].fmonth2; Player_time_class.fy1 = Deloreanlist[index].fy1; Player_time_class.fy2 = Deloreanlist[index].fy2; Player_time_class.fy3 = Deloreanlist[index].fy3; Player_time_class.fy4 = Deloreanlist[index].fy4; Player_time_class.fh1 = Deloreanlist[index].fh1; Player_time_class.fh2 = Deloreanlist[index].fh2; Player_time_class.fm1 = Deloreanlist[index].fm1; Player_time_class.fm2 = Deloreanlist[index].fm2; Player_time_class.fampm = Deloreanlist[index].fampm; Deloreanlist[index].refilltimecurcuits = false; Deloreanlist[index].Deloreon.DirtLevel = 12; below84 = true; if (Function.Call<bool>(Hash.IS_VEHICLE_EXTRA_TURNED_ON, new InputArgument[] { TimeTravel.instantDelorean.Deloreanlist[index].Deloreon, 10 })) { Function.Call(Hash.SET_VEHICLE_EXTRA, new InputArgument[] { TimeTravel.instantDelorean.Deloreanlist[index].Deloreon, 10, -1 }); } startfreeze(); Function.Call(Hash.SET_VEHICLE_MOD_KIT, Deloreanlist[index].Deloreon.Handle, 0); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Spoilers, 1, true); Deloreanlist[index].Deloreon.SetMod(VehicleMod.FrontBumper, -1, true); } else { enterintime(); make_effect("scr_rcpaparazzo1", "scr_rcpap1_camera", index); Timetravelreenterycutscene.Play(); //Timetravelreentery.Play(); if (!stoponce) { Deloreanlist[index].Deloreon.Speed = 0; stoponce = true; } if (!Variableclass.sendinvincible) { Deloreanlist[index].Deloreon.IsInvincible = true; } Deloreanlist[index].Deloreon.IsVisible = false; below48(); Game.Player.CanControlCharacter = false; delay.Reset(); delay.Stop(); int tempcount = 0; while (tempcount <= 30) { int eplode = (int)ExplosionType.FlameExplode; World.AddExplosion(Deloreanlist[index].Deloreon.GetOffsetInWorldCoords(new Vector3(1, tempcount + 3, -2)), (ExplosionType)eplode, (float)1, 0); World.AddExplosion(Deloreanlist[index].Deloreon.GetOffsetInWorldCoords(new Vector3(-1, tempcount + 3, -2)), (ExplosionType)eplode, (float)1, 0); tempcount++; Application.DoEvents(); } if (Game.Player.WantedLevel > 0) { Game.Player.WantedLevel = 0; } rentry.Start(); if (Function.Call<bool>(Hash.IS_VEHICLE_EXTRA_TURNED_ON, new InputArgument[] { TimeTravel.instantDelorean.Deloreanlist[index].Deloreon, 10 })) { Function.Call(Hash.SET_VEHICLE_EXTRA, new InputArgument[] { TimeTravel.instantDelorean.Deloreanlist[index].Deloreon, 10, -1 }); } Function.Call(Hash.SET_VEHICLE_MOD_KIT, Deloreanlist[index].Deloreon.Handle, 0); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Spoilers, 1, true); Deloreanlist[index].Deloreon.SetMod(VehicleMod.FrontBumper, -1, true); } } } } else { if (Deloreanlist[index].past84) { if (!entertime) { sparkprotect = false; stoponce = false; sparks.Stop(); Function.Call(Hash.SET_VEHICLE_MOD_KIT, Deloreanlist[index].Deloreon.Handle, 0); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Spoilers, 1, true); } } if (Function.Call<int>(Hash.GET_FOLLOW_VEHICLE_CAM_VIEW_MODE) == 4) { below84 = false; } delay.Stop(); delay.Reset(); Deloreanlist[index].past84 = false; flux_capcitor(index); } } else { Function.Call(Hash.SET_VEHICLE_MOD_KIT, Deloreanlist[index].Deloreon.Handle, 0); Deloreanlist[index].Deloreon.SetMod(VehicleMod.FrontBumper, -1, true); Deloreanlist[index].Deloreon.SetMod(VehicleMod.SideSkirt, -1, true); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Spoilers, -1, true); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Frame, -1, true); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Grille, -1, true); } }
public void tick(int X, int Y, int index) { int tick = DateTime.Now.Second; Application.DoEvents(); if (Directory.Exists(image)) { #region future //month display img = displaymonth((Deloreanlist[index].fmonth1 * 10) + Deloreanlist[index].fmonth2, time.Future); if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X, loc.Y + Y), new Size(88, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //Day display img = displaymunber(Deloreanlist[index].fday1, time.Future); if (File.Exists(image + "\\day\\1" + img)) { Sprite.DrawTexture(image + "\\day\\1" + img, new Point(loc.X + X + 90, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fday2, time.Future); if (File.Exists(image + "\\day\\2" + img)) { Sprite.DrawTexture(image + "\\day\\2" + img, new Point(loc.X + X + 110, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //yeardisplay img = displaymunber(Deloreanlist[index].fy1, time.Future); if (File.Exists(image + "\\year\\1" + img)) { Sprite.DrawTexture(image + "\\year\\1" + img, new Point(loc.X + X + 140, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fy2, time.Future); if (File.Exists(image + "\\year\\2" + img)) { Sprite.DrawTexture(image + "\\year\\2" + img, new Point(loc.X + X + 160, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fy3, time.Future); if (File.Exists(image + "\\year\\3" + img)) { Sprite.DrawTexture(image + "\\year\\3" + img, new Point(loc.X + X + 180, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fy4, time.Future); if (File.Exists(image + "\\year\\4" + img)) { Sprite.DrawTexture(image + "\\year\\4" + img, new Point(loc.X + X + 200, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #region ampm int h1 = 1, h2 = 2; if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 0) { h1 = 1; h2 = 2; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 1) { h1 = 0; h2 = 1; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 2) { h1 = 0; h2 = 2; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 3) { h1 = 0; h2 = 3; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 4) { h1 = 0; h2 = 4; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 5) { h1 = 0; h2 = 5; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 6) { h1 = 0; h2 = 6; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 7) { h1 = 0; h2 = 7; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 8) { h1 = 0; h2 = 8; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 9) { h1 = 0; h2 = 9; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 10) { h1 = 1; h2 = 0; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 11) { h1 = 1; h2 = 1; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 12) { h1 = 1; h2 = 2; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 13) { h1 = 0; h2 = 1; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 14) { h1 = 0; h2 = 2; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 15) { h1 = 0; h2 = 3; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 16) { h1 = 0; h2 = 4; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 17) { h1 = 0; h2 = 5; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 18) { h1 = 0; h2 = 6; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 19) { h1 = 0; h2 = 7; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 20) { h1 = 0; h2 = 8; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 21) { h1 = 0; h2 = 9; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 22) { h1 = 1; h2 = 0; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 23) { h1 = 1; h2 = 1; } #endregion Application.DoEvents(); //hour display img = displaymunber(h1, time.Future); if (File.Exists(image + "\\hour\\1" + img)) { Sprite.DrawTexture(image + "\\hour\\1" + img, new Point(loc.X + X + 250, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(h2, time.Future); if (File.Exists(image + "\\hour\\2" + img)) { Sprite.DrawTexture(image + "\\hour\\2" + img, new Point(loc.X + X + 270, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) > 12) { Deloreanlist[index].fampm = "pm"; } else { Deloreanlist[index].fampm = "am"; } UIResText Timedisplayf = new UIResText(Deloreanlist[index].timedisplayfuture(), new Point(1100, 570), (float)0.6, Color.Red); Timedisplayf.DropShadow = true; Timedisplayf.Draw(); //ampm img = "\\red " + Deloreanlist[index].fampm + ".jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 220, loc.Y + Y + 2), new Size(20, 28)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(loc.X + X, loc.Y + Y), (float)0.6); debug2.Draw(); } //tick if (tick != temptick) { Application.DoEvents(); if (ticktock) { ticktock = false; } else { ticktock = true; } temptick = tick; } else { Application.DoEvents(); if (ticktock) { img = "\\red colon on.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 287, loc.Y + Y + 10), new Size(10, 14)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } else { img = "\\red colon off.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 287, loc.Y + Y + 10), new Size(10, 14)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } } //minute display img = displaymunber(Deloreanlist[index].fm1, time.Future); if (File.Exists(image + "\\min\\1" + img)) { Sprite.DrawTexture(image + "\\min\\1" + img, new Point(loc.X + X + 300, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fm2, time.Future); if (File.Exists(image + "\\min\\2" + img)) { Sprite.DrawTexture(image + "\\min\\2" + img, new Point(loc.X + X + 320, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #endregion #region Present //month display img = displaymonth((Deloreanlist[index].presmonth1 * 10) + Deloreanlist[index].presmonth2, time.Present); if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X, loc.Y + Y + 30), new Size(88, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //Day display img = displaymunber(Deloreanlist[index].presday1, time.Present); if (File.Exists(image + "\\day\\1" + img)) { Sprite.DrawTexture(image + "\\day\\1" + img, new Point(loc.X + X + 90, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presday2, time.Present); if (File.Exists(image + "\\day\\2" + img)) { Sprite.DrawTexture(image + "\\day\\2" + img, new Point(loc.X + X + 110, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //yeardisplay img = displaymunber(Deloreanlist[index].presy1, time.Present); if (File.Exists(image + "\\year\\1" + img)) { Sprite.DrawTexture(image + "\\year\\1" + img, new Point(loc.X + X + 140, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presy2, time.Present); if (File.Exists(image + "\\year\\2" + img)) { Sprite.DrawTexture(image + "\\year\\2" + img, new Point(loc.X + X + 160, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presy3, time.Present); if (File.Exists(image + "\\year\\3" + img)) { Sprite.DrawTexture(image + "\\year\\3" + img, new Point(loc.X + X + 180, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presy4, time.Present); if (File.Exists(image + "\\year\\4" + img)) { Sprite.DrawTexture(image + "\\year\\4" + img, new Point(loc.X + X + 200, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #region ampm Deloreanlist[index].presampm = "am"; int hour = World.CurrentDayTime.Hours; if (hour == 0) { h1 = 1; h2 = 2; } else if (hour == 1) { h1 = 0; h2 = 1; } else if (hour == 2) { h1 = 0; h2 = 2; } else if (hour == 3) { h1 = 0; h2 = 3; } else if (hour == 4) { h1 = 0; h2 = 4; } else if (hour == 5) { h1 = 0; h2 = 5; } else if (hour == 6) { h1 = 0; h2 = 6; } else if (hour == 7) { h1 = 0; h2 = 7; } else if (hour == 8) { h1 = 0; h2 = 8; } else if (hour == 9) { h1 = 0; h2 = 9; } else if (hour == 10) { h1 = 1; h2 = 0; } else if (hour == 11) { h1 = 1; h2 = 1; } else if (hour == 12) { h1 = 1; h2 = 2; } else if (hour == 13) { h1 = 0; h2 = 1; } else if (hour == 14) { h1 = 0; h2 = 2; } else if (hour == 15) { h1 = 0; h2 = 3; } else if (hour == 16) { h1 = 0; h2 = 4; } else if (hour == 17) { h1 = 0; h2 = 5; } else if (hour == 18) { h1 = 0; h2 = 6; } else if (hour == 19) { h1 = 0; h2 = 7; } else if (hour == 20) { h1 = 0; h2 = 8; } else if (hour == 21) { h1 = 0; h2 = 9; } else if (hour == 22) { h1 = 1; h2 = 0; } else if (hour == 23) { h1 = 1; h2 = 1; } Application.DoEvents(); if (hour > 12) { Deloreanlist[index].fampm = "pm"; } else { Deloreanlist[index].fampm = "am"; } //ampm img = "\\green " + Deloreanlist[index].fampm + ".jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 220, loc.Y + Y + 32), new Size(20, 28)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(loc.X + X, loc.Y + Y), (float)0.6); debug2.Draw(); } #endregion //hour display img = displaymunber(h1, time.Present); if (File.Exists(image + "\\hour\\1" + img)) { Sprite.DrawTexture(image + "\\hour\\1" + img, new Point(loc.X + X + 250, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(h2, time.Present); if (File.Exists(image + "\\hour\\2" + img)) { Sprite.DrawTexture(image + "\\hour\\2" + img, new Point(loc.X + X + 270, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //tick if (tick != temptick) { if (ticktock) { ticktock = false; } else { ticktock = true; } temptick = tick; } else { if (ticktock) { img = "\\green colon on.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 287, loc.Y + Y + 40), new Size(10, 14)); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Grille, 0, true); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } else { img = "\\green colon off.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 287, loc.Y + Y + 40), new Size(10, 14)); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Grille, -1, true); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } } //minute display int presmin = World.CurrentDayTime.Minutes; if (presmin < 10) { Deloreanlist[index].presm1 = 0; Deloreanlist[index].presm2 = presmin; } else { if (presmin < 20) { Deloreanlist[index].presm1 = 1; Deloreanlist[index].presm2 = presmin - 10; } else if (presmin < 30) { Deloreanlist[index].presm1 = 2; Deloreanlist[index].presm2 = presmin - 20; } else if (presmin < 40) { Deloreanlist[index].presm1 = 3; Deloreanlist[index].presm2 = presmin - 30; } else if (presmin < 50) { Deloreanlist[index].presm1 = 4; Deloreanlist[index].presm2 = presmin - 40; } else if (presmin < 60) { Deloreanlist[index].presm1 = 5; Deloreanlist[index].presm2 = presmin - 50; } } //minute display img = displaymunber(Deloreanlist[index].presm1, time.Present); if (File.Exists(image + "\\min\\1" + img)) { Sprite.DrawTexture(image + "\\min\\1" + img, new Point(loc.X + X + 300, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presm2, time.Present); if (File.Exists(image + "\\min\\2" + img)) { Sprite.DrawTexture(image + "\\min\\2" + img, new Point(loc.X + X + 320, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #endregion #region Past //month display img = displaymonth((Deloreanlist[index].pastmonth1 * 10) + Deloreanlist[index].pastmonth2, time.Past); if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X, loc.Y + Y + 60), new Size(88, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //Day display img = displaymunber(Deloreanlist[index].pastday1, time.Past); if (File.Exists(image + "\\day\\1" + img)) { Sprite.DrawTexture(image + "\\day\\1" + img, new Point(loc.X + X + 90, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pastday2, time.Past); if (File.Exists(image + "\\day\\2" + img)) { Sprite.DrawTexture(image + "\\day\\2" + img, new Point(loc.X + X + 110, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //yeardisplay img = displaymunber(Deloreanlist[index].pasty1, time.Past); if (File.Exists(image + "\\year\\1" + img)) { Sprite.DrawTexture(image + "\\year\\1" + img, new Point(loc.X + X + 140, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pasty2, time.Past); if (File.Exists(image + "\\year\\2" + img)) { Sprite.DrawTexture(image + "\\year\\2" + img, new Point(loc.X + X + 160, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pasty3, time.Past); if (File.Exists(image + "\\year\\3" + img)) { Sprite.DrawTexture(image + "\\year\\3" + img, new Point(loc.X + X + 180, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pasty4, time.Past); if (File.Exists(image + "\\year\\4" + img)) { Sprite.DrawTexture(image + "\\year\\4" + img, new Point(loc.X + X + 200, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #region ampm h1 = 1; h2 = 2; if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 0) { h1 = 1; h2 = 2; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 1) { h1 = 0; h2 = 1; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 2) { h1 = 0; h2 = 2; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 3) { h1 = 0; h2 = 3; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 4) { h1 = 0; h2 = 4; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 5) { h1 = 0; h2 = 5; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 6) { h1 = 0; h2 = 6; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 7) { h1 = 0; h2 = 7; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 8) { h1 = 0; h2 = 8; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 9) { h1 = 0; h2 = 9; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 10) { h1 = 1; h2 = 0; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 11) { h1 = 1; h2 = 1; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 12) { h1 = 1; h2 = 2; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 13) { h1 = 0; h2 = 1; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 14) { h1 = 0; h2 = 2; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 15) { h1 = 0; h2 = 3; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 16) { h1 = 0; h2 = 4; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 17) { h1 = 0; h2 = 5; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 18) { h1 = 0; h2 = 6; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 19) { h1 = 0; h2 = 7; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 20) { h1 = 0; h2 = 8; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 21) { h1 = 0; h2 = 9; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 22) { h1 = 1; h2 = 0; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 23) { h1 = 1; h2 = 1; } #endregion //hour display img = displaymunber(h1, time.Past); if (File.Exists(image + "\\hour\\1" + img)) { Sprite.DrawTexture(image + "\\hour\\1" + img, new Point(loc.X + X + 250, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(h2, time.Past); if (File.Exists(image + "\\hour\\2" + img)) { Sprite.DrawTexture(image + "\\hour\\2" + img, new Point(loc.X + X + 270, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) > 12) { Deloreanlist[index].fampm = "pm"; } else { Deloreanlist[index].fampm = "am"; } //ampm img = "\\amber " + Deloreanlist[index].pastampm + ".jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 220, loc.Y + Y + 62), new Size(20, 28)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(loc.X + X, loc.Y + Y + 50), (float)0.6); debug2.Draw(); } //tick if (tick != temptick) { if (ticktock) { ticktock = false; } else { ticktock = true; } temptick = tick; } else { if (ticktock) { img = "\\amber colon on.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 287, loc.Y + Y + 70), new Size(10, 14)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } else { img = "\\amber colon off.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 287, loc.Y + Y + 70), new Size(10, 14)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } } //minute display img = displaymunber(Deloreanlist[index].pastm1, time.Past); if (File.Exists(image + "\\min\\1" + img)) { Sprite.DrawTexture(image + "\\min\\1" + img, new Point(loc.X + X + 300, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pastm2, time.Past); if (File.Exists(image + "\\min\\2" + img)) { Sprite.DrawTexture(image + "\\min\\2" + img, new Point(loc.X + X + 320, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #endregion } else { UIText debug2 = new UIText("images folder not present. Please place images folder in the scripts folder" + image, new Point(400, 100), (float)0.6); debug2.Draw(); } }