public Slider(ContentManager content, Vector2 position, Vector2 sizeInPx, float value, Color color, SliderType type) { //Save the properties of the slider _position = position; _sizeInPx = sizeInPx; _value = value; _color = color; _type = type; //Load some basic content content.Load<Texture2D>("UIElements/sliderMiddle"); content.Load<Texture2D>("UIElements/sliderEnd"); content.Load<Texture2D>("UIElements/sliderMarker"); //Set the zero zone and max zone values if (type == SliderType.HorizontalSlider) { _zeroZoneMax = Vector2.Multiply(sizeInPx, new Vector2(0.1f, 1.0f)) + position; _maxZoneMin = Vector2.Multiply(sizeInPx, new Vector2(0.9f, 1.0f)) + position; } else if (type == SliderType.VerticalSlider) { _zeroZoneMax = Vector2.Multiply(sizeInPx, new Vector2(1.0f, 0.1f)) + position; _maxZoneMin = Vector2.Multiply(sizeInPx, new Vector2(1.0f, 0.9f)) + position; } //Initialize all of the necessary boundries _bounds = new Rectangle((int)position.X, (int)position.Y, (int)sizeInPx.X, (int)sizeInPx.Y); _zeroZoneBounds = new Rectangle((int)position.X, (int)position.Y, (int)(sizeInPx.X * 0.1f), (int)sizeInPx.Y); _normalZoneBounds = new Rectangle((int)(position.X + sizeInPx.X * 0.1f), (int)position.Y, (int)(sizeInPx.X * 0.8f), (int)sizeInPx.Y); _maxZoneBounds = new Rectangle((int)(position.X + sizeInPx.X * 0.9f), (int)position.Y, (int)(sizeInPx.X * 0.1f), (int)sizeInPx.Y); _markerZoneBounds = new Rectangle((int)(_normalZoneBounds.Width * _value + position.X), (int)position.Y, _sliderMarker.Width, (int)sizeInPx.Y); }
public Curve(SliderType sliderType) { this.CurveType = sliderType; this.Points = new List <Vector2>(); this.CurveSnapshots = new List <DistanceTime>(); // unless the SliderObject wants the length to be limited, then we have no limit this.PixelLength = Single.PositiveInfinity; }
public Curve(SliderType sliderType) { this.CurveType = sliderType; this.Points = new List<Vector2>(); this.CurveSnapshots = new List<DistanceTime>(); // unless the SliderObject wants the length to be limited, then we have no limit this.PixelLength = Single.PositiveInfinity; }
public GameScreenSlider(Game game, string assetFolder, string assetName, int totalScreens, SliderType type) : base(game, assetFolder) { AssetName = assetName; SliderType = type; TotalScreenCount = (totalScreens - 1); // 0 based indexing EnabledGestures = GestureType.HorizontalDrag | GestureType.Tap | GestureType.DragComplete; }
public Slider(Guid id, string imageName, int order, SliderType sliderType) { Id = id; SliderType = sliderType; Order = order; ImageName = imageName; IsActive = false; SliderType = SliderType.Slider; }
public HitSlider(Vector2 position, int time, int hitSound, SliderType type, HitSliderSegment[] hitSliderSegments, int repeat, float pixelLength, int edgeHitSound, int[] edgeAddition, int[] addition, bool isNewCombo) : base(position, time, hitSound, addition, isNewCombo) { init(); this.Type = type; this.HitSliderSegments.AddRange(hitSliderSegments); this.Repeat = repeat; this.PixelLength = pixelLength; this.EdgeHitSound = edgeHitSound; this.EdgeAddition.AddRange(edgeAddition); }
public HitSlider(Vector2 position, int time, int hitSound, SliderType type, HitSliderSegment[] hitSliderSegments, int repeat, float pixelLength, int edgeHitSound, int[] edgeAddition, int[] addition, bool isNewCombo) : base(position, time, hitSound, addition, isNewCombo) { init(); this.Type = type; this.HitSliderSegments.AddRange(hitSliderSegments); this.Repeat = repeat; this.PixelLength = pixelLength; this.EdgeHitSound = edgeHitSound; this.EdgeAddition.AddRange(edgeAddition); }
public Slider(Game game, string assetFolder, string buttonTexName, string sliderTexName, SliderType type) : base(game) { AssetName = buttonTexName; sliderTextureName = sliderTexName; AssetFolder = assetFolder; SliderType = type; BoundingBoxScale = new Vector2(5, 5); }
public void Init(RectTransform transform, Action action, SliderType sliderType, CancellationToken token) { cancellationToken = token; postAction = action; timer = 1f; this.transform = transform; this.sliderType = sliderType; animAction = GetSlideType(); AnimProgress = 0f; }
public override void WriteToXml(XmlTextWriter xml) { xml.WriteStartElement("axis"); xml.WriteAttributeString("type", SliderType.ToString()); xml.WriteAttributeString("alias", InternalID); xml.WriteAttributeString("description", Description); xml.WriteAttributeString("min", Min.ToString()); xml.WriteAttributeString("max", Max.ToString()); xml.WriteAttributeString("axisName", AxisName); xml.WriteAttributeString("reverse", Reverse.ToString()); xml.WriteEndElement(); }
public ScrollBar(State state, ScrollPanel parentPanel, SliderType sliderType) : base(0, 0, 1, 1, state) { _scrollPanel = parentPanel; _sliderType = sliderType; _scrollableAmount = 0; _sliderPosition = Vector3.Zero; _sliderInitialized = false; this.SetPosition(GetBodyX(), GetBodyY()); this.SetSize(GetBodyWidth(), GetBodyHeight()); _grabbed = false; _backgroundColour = Color4.SlateGray; }
public SliderFormat(string[] split) { x = float.Parse(split[0]); y = float.Parse(split[1]); timeInMs = int.Parse(split[2]); group = int.Parse(split[3]); var typeAndAnchorSplit = split[5].Split('|'); var anchors = typeAndAnchorSplit.Skip(1).ToArray(); foreach (var anchor in anchors) { var xy = anchor.Split(':').Select(float.Parse).ToArray(); vectors.Add(new Vector2(xy[0], xy[1])); } switch (typeAndAnchorSplit[0]) { case "L": type = SliderType.LinearLine; points = LinearLine.GetPoints(new Vector2(x, y), vectors[0]); break; case "P": { type = SliderType.PerfectCurve; var list = new List <Vector3>(vectors); list.Insert(0, new Vector3(x, y, 0)); points = PerfectCurve.GetPoints(list); break; } case "B": { type = SliderType.BezierCurve; var list = new List <Vector3>(vectors); list.Insert(0, new Vector3(x, y, 0)); points = BezierCurve.GetPoints(list); break; } } sliderTrips = int.Parse(split[6]); tripMs = double.Parse(split[7]); }
static public float GetSliderValue(SliderType sliderType) { switch (sliderType) { case SliderType.NUM_OF_SNAKES: return m_Slider_NumberOfSnakes; case SliderType.LANTERN_SIZE: return m_Slider_LanternSize; break; case SliderType.HEALTH: return m_Slider_Health; case SliderType.OIL_MAX: return m_Slider_MaxOil; case SliderType.LENGTH_OF_TRAIL: break; } return -1; }
/// <summary> /// Override string function to return string readable by .osu file format. /// </summary> /// <returns></returns> public override string SerializeForOsu() { var builder = new StringBuilder(); builder.AppendFormat("{0},{1},{2},{3},{4},{5}|", MathHelper.RoundToInt(startPosition.X), MathHelper.RoundToInt(startPosition.Y), Time, ((int)HitType), ((int)HitSound), SliderType.GetSliderChar()); int i; for (i = 0; i < curvePoints.Count - 1; i++) { builder.AppendFormat("{0}:{1}|", MathHelper.RoundToInt(curvePoints[i].X), MathHelper.RoundToInt(curvePoints[i].Y)); } builder.AppendFormat("{0}:{1},{2},{3}", MathHelper.RoundToInt(curvePoints[i].X), MathHelper.RoundToInt(curvePoints[i].Y), Repeat, Length); return(builder.ToString()); }
/// <summary> /// Gets by type /// </summary> /// <returns>Picture Sliders</returns> public virtual IList <PictureSlider> GetPictureSliders(SliderType sliderType, string objectEntry = "") { string cacheKey = string.Format(SLIDERS_MODEL_KEY, _storeContext.CurrentStore.Id, sliderType.ToString(), objectEntry); return(_cacheManager.Get(cacheKey, () => { var query = from s in _reporistoryPictureSlider.Table where s.SliderTypeId == (int)sliderType && s.Published select s; if (!string.IsNullOrEmpty(objectEntry)) { query = query.Where(x => x.ObjectEntry == objectEntry); } return query.ToList().Where(c => _storeMappingService.Authorize(c)).ToList(); })); }
private void ColorRangeIntervalSlider_MouseUp(object sender, MouseEventArgs e) { if (currentSlider == SliderType.Start) { if (ColorRangeStartValueChanged != null) { ColorRangeStartValueChanged(this, new EventArgs()); } } else if (currentSlider == SliderType.End) { if (ColorRangeEndValueChanged != null) { ColorRangeEndValueChanged(this, new EventArgs()); } } currentSlider = SliderType.None; }
public static List <SliderImage> GetSlides(SliderType sliderType) { using (var db = OnlineStoreDbContext.Entity) { DateTime now = DateTime.Now; var query = from item in db.SliderImages where item.SliderType == sliderType && item.IsActive && now >= item.StartDate && now <= item.EndDate select item; query = query.OrderBy(item => item.OrderID); return(query.Take(5).ToList()); } }
/// <summary> /// Gets by type /// </summary> /// <returns>Picture Sliders</returns> public virtual async Task <IList <PictureSlider> > GetPictureSliders(SliderType sliderType, string objectEntry = "") { string cacheKey = string.Format(SLIDERS_MODEL_KEY, _workContext.CurrentStore.Id, sliderType.ToString(), objectEntry); return(await _cacheBase.GetAsync(cacheKey, async() => { var query = from s in _reporistoryPictureSlider.Table where s.SliderTypeId == (int)sliderType && s.Published select s; if (!string.IsNullOrEmpty(objectEntry)) { query = query.Where(x => x.ObjectEntry == objectEntry); } var items = await query.ToListAsync(); return items.Where(c => _aclService.Authorize(c, _workContext.CurrentStore.Id)).ToList(); })); }
public IUIObject CreateFrame(FrameType frameType, string name, IFrame parent, string inherits) { LayoutFrameType xml; switch (frameType) { case FrameType.Frame: xml = new ObjFrameType(); break; case FrameType.Button: xml = new ButtonType(); break; case FrameType.EditBox: xml = new EditBoxType(); break; case FrameType.GameTooltip: xml = new GameTooltipType(); break; case FrameType.CheckButton: xml = new CheckButtonType(); break; case FrameType.ScrollFrame: xml = new ScrollFrameType(); break; case FrameType.Slider: xml = new SliderType(); break; default: throw new UiSimuationException(string.Format("Unhandled frame type {0}.", frameType)); } xml.inherits = inherits; xml.name = name; xml.Items = new object[] {}; return(this.util.CreateObject(xml, parent)); }
internal static string ParseToCode(this SliderType sliderType) { switch (sliderType) { case SliderType.Linear: return("L"); case SliderType.Perfect: return("P"); case SliderType.Bezier: return("B"); case SliderType.Catmull: return("C"); default: throw new ArgumentOutOfRangeException(nameof(sliderType), sliderType, null); } }
public override string ToString() { var sampleList = new List <(ObjectSamplesetType, ObjectSamplesetType)>(); string edgeSampleStr; string edgeHitsoundStr; if (EdgeSamples != null) { for (var i = 0; i < EdgeSamples.Length; i++) { var objectSamplesetType = EdgeSamples[i]; var objectAdditionType = EdgeAdditions[i]; sampleList.Add((objectSamplesetType, objectAdditionType)); } edgeSampleStr = "," + string.Join("|", sampleList.Select(k => $"{(int)k.Item1}:{(int)k.Item2}")); } else { edgeSampleStr = ""; } if (EdgeHitsounds != null) { edgeHitsoundStr = "," + string.Join("|", EdgeHitsounds.Select(k => $"{(int)k}")); } else { edgeHitsoundStr = ""; } return(string.Format("{0}|{1},{2},{3}{4}{5}", SliderType.ParseToCode(), string.Join("|", CurvePoints.Select(k => $"{k.X}:{k.Y}")), Repeat, PixelLength, edgeHitsoundStr, edgeSampleStr)); }
/// <summary> /// 根据sliderName获取轮播图 /// </summary> /// <param name="webmaster"></param> /// <param name="sliderName"></param> /// <returns></returns> public static string GetSlider(List <webmaster> webmaster, string sliderName) { string slider = null; SliderType sliderType = new SliderType(); if (webmaster != null && sliderName != null) { foreach (var web in webmaster) { if (web.vcName.ToUpper() == sliderName.ToUpper()) { sliderType.slider = web.vcContent; slider = JsonConvert.SerializeObject(sliderType, Newtonsoft.Json.Formatting.Indented); break; } } } else { slider = "no"; } return(slider); }
public static void UpdateSlider(string sliderID, float value, SliderType sType) { if (instance != null) { if (instance.safeToUpdateSliders) { switch (sType) { case SliderType.MTD: if (instance.manager.coreMorphs.morphLookup.ContainsKey(sliderID)) { instance.manager.SetBlendshapeValue(sliderID, value); //print("updated slider value under: " + instance.transform.root.name); } else { Debug.Log("<color=red>ERROR: attempting to update a morph slider that doesn't appear to exist: </color>" + sliderID); } break; } } } }
public Slider(Vector2 barPos, string label, SliderType type) { _barPos = barPos; _label = label; Type = type; switch (Type) { case SliderType.Music: _sliderPos = new Vector2(_barPos.X + GameConstants.MusicLevel * 100, _barPos.Y - 5); break; case SliderType.Sound: _sliderPos = new Vector2(_barPos.X + GameConstants.SoundLevel * 100, _barPos.Y - 5); break; case SliderType.Difficulty: _sliderPos = new Vector2(_barPos.X + GameConstants.Difficulty * 100, _barPos.Y - 5); break; default: throw new ArgumentOutOfRangeException(); } }
private void setSlides() { PreviewComponent preview = new PreviewComponent("Previews/Snake Preview", new Vector2(180, 50), Color.White); OptionType option = new OptionType("Save", "Lindsey", Color.Red, new Vector2(24, 200), OptionAction.previous, true, new Rectangle(24, 200, 120, 30), "Menus/Highlight"); ColorChangeComponent colorChanger = new ColorChangeComponent(preview, option, 7); SliderType slider = new SliderType("Sliders/Slider", new Vector2(90, 110), "Sliders/Slide Nub", new Vector2(90, 110), Color.White); HighlightType highlighter = new HighlightType(new Vector2(24, 100), "Menus/Highlight", Color.White); colorChanger.addSlider(new SlideType(new StringType("Red", new Vector2(24, 100), Color.Red), highlighter, slider, "Lindsey", 255)); slider = new SliderType("Sliders/Slider", new Vector2(90, 140), "Sliders/Slide Nub", new Vector2(90, 140), Color.White); highlighter = new HighlightType(new Vector2(24, 130), "Menus/Highlight", Color.White); colorChanger.addSlider(new SlideType(new StringType("Green", new Vector2(24, 130), Color.Red), highlighter, slider, "Lindsey", 255)); slider = new SliderType("Sliders/Slider", new Vector2(90, 170), "Sliders/Slide Nub", new Vector2(90, 170), Color.White); highlighter = new HighlightType(new Vector2(24, 160), "Menus/Highlight", Color.White); colorChanger.addSlider(new SlideType(new StringType("Blue", new Vector2(24, 160), Color.Red), highlighter, slider, "Lindsey", 255)); colorChanger.setSave(SaveColor); addComponent(colorChanger); }
public Slider(Game game, SliderType type) : base(game) { SliderType = type; }
private void ColorRangeIntervalSlider_MouseUp(object sender, MouseEventArgs e) { if (currentSlider == SliderType.Start) { if (ColorRangeStartValueChanged != null) ColorRangeStartValueChanged(this, new EventArgs()); } else if(currentSlider == SliderType.End) { if (ColorRangeEndValueChanged != null) ColorRangeEndValueChanged(this, new EventArgs()); } currentSlider = SliderType.None; }
private void ColorRangeIntervalSlider_MouseDown(object sender, MouseEventArgs e) { if (colorRangeRectangle.Contains(e.Location)) { if (ColorRangeClicked != null) ColorRangeClicked(this, e); } else { // get closest slider int startCloseness = Math.Abs(e.X - ValueToX(colorRange.StartValue)); int endCloseness = Math.Abs(e.X - ValueToX(colorRange.EndValue)); if (startCloseness < endCloseness && startCloseness < MOUSE_CLOSENESS) { currentSlider = SliderType.Start; colorRange.StartValue = Math.Max(minValue, Math.Min(maxValue, XToValue(e.X))); Draw(); } else if (endCloseness < MOUSE_CLOSENESS) { currentSlider = SliderType.End; colorRange.EndValue = Math.Max(minValue, Math.Min(maxValue, XToValue(e.X))); Draw(); } else { currentSlider = SliderType.None; } } }
public FilterTypeDescriptor(string name, SceneItemFilterType type, FilterCategory category, SliderType sliderType, double defaultValue = 0.0) { Name = name; Type = type; SliderType = sliderType; DefaultValue = defaultValue; Category = category; }
private void hoursBarMouseDown(object sender, MouseButtonEventArgs e) { _sliderType = SliderType.hoursBar; pptableCommonMouseDown(sender, e); }
/// <summary> /// درج مقادیر اولیه در دیتابیس به هنگام ساخت دیتابیس /// </summary> /// <param name="context">شی دیتابیس اصلی برنامه</param> protected override void Seed(AsefianContext context) { foreach (var item in Language.GetList()) { context.Language.Add(item); } #region Account foreach (var item in UserType.GetList()) { context.UserType.Add(item); } foreach (var item in BalanceType.GetList()) { context.BalanceType.Add(item); } foreach (var item in Browser.GetList()) { context.Browser.Add(item); } foreach (var item in DeviceType.GetList()) { context.DeviceType.Add(item); } foreach (var item in GroupStatus.GetList()) { context.GroupStatus.Add(item); } foreach (var item in NotificationStatus.GetList()) { context.NotificationStatus.Add(item); } foreach (var item in NotificationType.GetList()) { context.NotificationType.Add(item); } foreach (var item in Account.Enum.OperatingSystem.GetList()) { context.OperatingSystem.Add(item); } foreach (var item in Sex.GetList()) { context.Sex.Add(item); } foreach (var item in TokenType.GetList()) { context.TokenType.Add(item); } foreach (var item in UserAddressStatus.GetList()) { context.UserAddressStatus.Add(item); } foreach (var item in UserFavoriteFolderStatus.GetList()) { context.UserFavoriteFolderStatus.Add(item); } foreach (var item in UserFavoriteStatus.GetList()) { context.UserFavoriteStatus.Add(item); } foreach (var item in UserStatus.GetList()) { context.UserStatus.Add(item); } #endregion #region Blog foreach (var item in ArticleFileStatus.GetList()) { context.ArticleFileStatus.Add(item); } foreach (var item in ArticleStatus.GetList()) { context.ArticleStatus.Add(item); } foreach (var item in NewsStatus.GetList()) { context.NewsStatus.Add(item); } #endregion #region Core foreach (var item in BranchStatus.GetList()) { context.BranchStatus.Add(item); } foreach (var item in LocationType.GetList()) { context.LocationType.Add(item); } foreach (var item in SliderContentStatus.GetList()) { context.SliderContentStatus.Add(item); } foreach (var item in SliderStatus.GetList()) { context.SliderStatus.Add(item); } foreach (var item in SliderType.GetList()) { context.SliderType.Add(item); } #endregion #region Data foreach (var item in ExportStatus.GetList()) { context.ExportStatus.Add(item); } foreach (var item in ContactUsStatus.GetList()) { context.ContactUsStatus.Add(item); } foreach (var item in SpecialProjectStatus.GetList()) { context.SpecialProjectStatus.Add(item); } foreach (var item in SpecialProjectFileStatus.GetList()) { context.SpecialProjectFileStatus.Add(item); } foreach (var item in BrandStatus.GetList()) { context.BrandStatus.Add(item); } foreach (var item in CategoryFeatureStatus.GetList()) { context.CategoryFeatureStatus.Add(item); } foreach (var item in CategoryFeatureType.GetList()) { context.CategoryFeatureType.Add(item); } foreach (var item in CategoryStatus.GetList()) { context.CategoryStatus.Add(item); } foreach (var item in CategoryType.GetList()) { context.CategoryType.Add(item); } foreach (var item in DownloadCenterStatus.GetList()) { context.DownloadCenterStatus.Add(item); } foreach (var item in ProductFileStatus.GetList()) { context.ProductFileStatus.Add(item); } foreach (var item in ProductFileType.GetList()) { context.ProductFileType.Add(item); } foreach (var item in ProductFilterStatus.GetList()) { context.ProductFilterStatus.Add(item); } foreach (var item in ProductFilterType.GetList()) { context.ProductFilterType.Add(item); } foreach (var item in ProductFilterValueStatus.GetList()) { context.ProductFilterValueStatus.Add(item); } foreach (var item in ProductStatus.GetList()) { context.ProductStatus.Add(item); } foreach (var item in ServiceStatus.GetList()) { context.ServiceStatus.Add(item); } #endregion #region Financial foreach (var item in CouponStatus.GetList()) { context.CouponStatus.Add(item); } foreach (var item in CouponType.GetList()) { context.CouponType.Add(item); } foreach (var item in DeliveryType.GetList()) { context.DeliveryType.Add(item); } foreach (var item in InquiryStatus.GetList()) { context.InquiryStatus.Add(item); } foreach (var item in InvoiceDetailStatus.GetList()) { context.InvoiceDetailStatus.Add(item); } foreach (var item in InvoiceStatus.GetList()) { context.InvoiceStatus.Add(item); } foreach (var item in PaymentType.GetList()) { context.PaymentType.Add(item); } #endregion #region Support foreach (var item in FaqCategoryStatus.GetList()) { context.FaqCategoryStatus.Add(item); } foreach (var item in FaqStatus.GetList()) { context.FaqStatus.Add(item); } foreach (var item in MessageBoxStatus.GetList()) { context.MessageBoxStatus.Add(item); } foreach (var item in NewsLetterStatus.GetList()) { context.NewsLetterStatus.Add(item); } foreach (var item in TicketMessageType.GetList()) { context.TicketMessageType.Add(item); } foreach (var item in TicketPriority.GetList()) { context.TicketPriority.Add(item); } foreach (var item in TicketStatus.GetList()) { context.TicketStatus.Add(item); } foreach (var item in MessageType.GetList()) { context.MessageType.Add(item); } #endregion var admin = new User() { FirstName = "مدیر", LastName = "سیستم", MobileNumber = "09122424519", MobileNumberValid = true, Email = "*****@*****.**", EmailValid = true, SexId = Sex.Male.Id, TypeId = UserType.Insider.Id, Password = PasswordUtility.Encrypt("alialiali"), StatusId = UserStatus.Active.Id, Permission = 1, CreateDate = DateTime.Now, ModifyDate = DateTime.Now, CreateIp = "::1", ModifyIp = "::1" }; context.User.Add(admin); }
private void dayLittleWindowMouseDown(object sender, MouseButtonEventArgs e) { _sliderType = SliderType.daysLittleWindow; pptableCommonMouseDown(sender, e); }
public override void ConfigureController(Microsoft.DirectX.DirectInput.Device device) { base.ConfigureController(device); Guid axis = AxisTypeGuid; bool slider = SliderType == AxisType.EXT1 || SliderType == AxisType.EXT2; bool hasAxis = false; Microsoft.DirectX.DirectInput.DeviceObjectList list = device.GetObjects(Microsoft.DirectX.DirectInput.DeviceObjectTypeFlags.Axis); foreach (Microsoft.DirectX.DirectInput.DeviceObjectInstance o in list) { if (o.ObjectType == axis) { if (slider && o.Name != AxisName) { continue; } Debug.WriteLine("Ustawienie parametrów osi: " + SliderType.ToString() + " kontrolera '" + device.DeviceInformation.InstanceName + "." + device.DeviceInformation.InstanceGuid.ToString() + "'."); device.Properties.SetRange(Microsoft.DirectX.DirectInput.ParameterHow.ById, o.ObjectId, new Microsoft.DirectX.DirectInput.InputRange(Min, Max)); hasAxis = true; break; } } if (!hasAxis) { throw new ApplicationException("Kontroler '" + device.DeviceInformation.InstanceName + "' o identyfikatorze '" + Controller.Alias + "' nie posiada osi '" + SliderType.ToString() + "'."); } }
public Slider(SliderType sliderType) { this.m_SliderType = sliderType; }
public override void EditorLogic() { sliderType = (SliderType)EditorGUILayout.EnumPopup("Slider Type: ", sliderType); }
private void TestSlider(Slider slider, int x, int y, int time, bool newCombo, SliderType sliderType, int repeat, double pixelLength, int curvePointCount, int curvePoint0X, int curvePoint0Y, CurvePointType curvePoint0Type) { Assert.AreEqual(x, slider.X); Assert.AreEqual(y, slider.Y); Assert.AreEqual(time, slider.Time); Assert.AreEqual(newCombo, slider.NewCombo); Assert.AreEqual(sliderType, slider.SliderType); Assert.AreEqual(repeat, slider.Repeat); Assert.AreEqual(pixelLength, slider.PixelLength); // Should really test all curve points but will only test first point for now (since test slider only has one) Assert.AreEqual(curvePointCount, slider.CurvePoints.Count); Assert.AreEqual(curvePoint0X, slider.CurvePoints[0].x); Assert.AreEqual(curvePoint0Y, slider.CurvePoints[0].y); Assert.AreEqual(curvePoint0Type, slider.CurvePoints[0].type); }
// Sets the slider type. // IN: aType The slider type. public void SetType(SliderType aType) { mSliderType = aType; }
public void SetSliderType(SliderType type) { sliderType = type; }