public NavigationDropDown SetIcon(Icon iconType, IconColor color) { if (this.Component.LinkIcon == null) { this.Component.LinkIcon = new Helpers.IconHelper.Icon(); } this.Component.LinkIcon.SetIconType(iconType); this.Component.LinkIcon.SetIconColor(color); return(this); }
public static String ResolveColor(IconColor color) { switch (color) { case IconColor.Black: return String.Empty; case IconColor.White: return "glyphicon-white"; } return String.Empty; }
public static String ResolveColor(IconColor color) { switch (color) { case IconColor.Black: return(String.Empty); case IconColor.White: return("glyphicon-white"); } return(String.Empty); }
public IconThemeComponent(ThemeComponentType componentType, string componentName, IconSize componentIconSize, IconColor componentIconColor, IconShape componentIconShape) { if (componentName == null) { throw new ArgumentException("Null parameters not allowed in IconThemeComponent constructor"); } ComponentType = componentType; ComponentName = componentName; IconSize = componentIconSize; IconColor = componentIconColor; IconShape = componentIconShape; }
private void SetIconColor() { if (Control.Settings.ColorHardpointsIcon) { IconColor.SetUIColor(uicolor); if (uicolor == UIColor.Custom) { IconColor.OverrideWithColor(color); } } else { IconColor.SetUIColor(Control.Settings.HardpointIconDefaultColor); } }
/// <summary> /// Constructor for TabbedPageExt. You can pass an optional IconColor value specifying whether /// the 'more' toolbar icon is black or white. On iOS it comes as any other iOS icon in the toolbar (e.g. blue). /// </summary> /// <param name="androidMoreIconColor">Color of the More toolbar icon for Android</param> /// <param name="winMoreIconColor">Color of the More toolbar icon for UWP</param> public TabbedPageExt(IconColor moreIconColor = IconColor.White) { double topPadding = Device.RuntimePlatform == Device.iOS ? 44 : 56; MorePopupMenuMargin = new Thickness(0, topPadding, 8, 0); MorePopupMenuItemHeigth = (Device.RuntimePlatform == Device.iOS) ? 44 : (Device.RuntimePlatform == Device.Android) ? 45 : 33; MoreToolbarIcon = moreIconColor == IconColor.White ? "tabbedpageext_more_vert_white.png" : "tabbedpageext_more_vert_black.png"; MorePopupMenuBackgroundColor = Color.FromHex("#303030"); MorePopupMenuItemTextColor = Color.White; MorePopupMenuItemSeperatorColor = Color.FromHex("#9C969C"); MorePopupMenuItemSelectedBackgroundColor = Color.FromHex("#707070"); TabPages = new ObservableCollection <TabPage>(); TabPages.CollectionChanged += TabPages_CollectionChanged; }
public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) { output.TagName = ""; var containerTag = new TagBuilder("span"); containerTag.AddCssClass("slds-icon_container"); containerTag.AddCssClass($"slds-icon-{IconSprite.ToString().ToLower()}-{IconName.ToLower()}"); containerTag.Attributes.Add("title", Title); var svgTag = new TagBuilder("svg"); svgTag.AddCssClass("slds-icon"); var assistiveTextTag = new TagBuilder("span"); assistiveTextTag.AddCssClass("slds-assistive-text"); assistiveTextTag.InnerHtml.Append(Title); if (output.Attributes.TryGetAttribute("class", out var @class)) { svgTag.AddCssClass(@class.Value.ToString()); } if (IconColor != IconColor.None) { svgTag.AddCssClass($"slds-icon-text-{IconColor.ToString().ToLower()}"); } if (IconSize != IconSize.None) { svgTag.AddCssClass(sizes[IconSize]); } var useTag = new TagBuilder("use"); useTag.Attributes.Add("xlink:href", $"/assets/icons/{IconSprite.ToString().ToLower()}-sprite/svg/symbols.svg#{IconName}"); svgTag.InnerHtml.AppendHtml(useTag); containerTag.InnerHtml .AppendHtml(svgTag) .AppendHtml(assistiveTextTag); output.Content.SetHtmlContent(containerTag); // return base.ProcessAsync(context, output); }
private Texture2D GetItem(string name, IconSize size, IconColor color) { var variant = new IconVariant(name, size, color); if (!_icons.ContainsKey(variant)) { variant = new IconVariant(name, IconSize.Large, color); } if (!_icons.ContainsKey(variant)) { variant = new IconVariant(name, IconSize.Large, IconColor.Gray); } return(_icons[variant]); }
// ******************** API ******************** /// <summary> /// Registers a game with GameSense server. Must be called before everything else. /// </summary> /// <param name="name">Game Identifier. Valid characters are limited to uppercase A-Z, the digits 0-9, hyphen, and underscore</param> /// <param name="displayName">The name that will appear in SteelSeries Engine for this game</param> /// <param name="iconColor">Color icon identifier that will appear for this game in SteelSeries Engine</param> public void RegisterGame(string name, string displayName, IconColor iconColor) { #if (UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX) && !SS_GAMESENSE_DISABLED GameName = name.ToUpper(); GameDisplayName = displayName; IconColor = iconColor; Register_Game obj = new Register_Game(); obj.game = GameName; obj.game_display_name = GameDisplayName; obj.icon_color_id = iconColor; QueueMsgRegisterGame msg = new QueueMsgRegisterGame(); msg.data = obj; _mMsgQueue.PEnqueue(msg); #endif // (UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX) && !SS_GAMESENSE_DISABLED }
private void DrawIcon(SKCanvas canvas, float radius) { canvas.Save(); var baseRadius = radius.Scale(0.80f); canvas.Scale(baseRadius.Scale(0.2f)); _paint.Style = SKPaintStyle.Stroke; _paint.StrokeWidth = baseRadius.Scale(0.01f); _paint.ImageFilter = null; _paint.Color = IsChecked ? IconColor.ToSKColor() : BackgroundColor.ToBaseGradientColors(IsEnabled)[1]; canvas.DrawPath(SKPath.ParseSvgPathData(Path), _paint); canvas.Restore(); }
private Texture2D GetItem(string name, IconSize size, IconColor color) { var variant = new IconVariant(name, size, color); if (!_icons.ContainsKey(variant)) { variant = new IconVariant(name, IconSize.Large, color); } if (!_icons.ContainsKey(variant)) { variant = new IconVariant(name, IconSize.Large, IconColor.Gray); } if (!_icons.ContainsKey(variant)) { throw new InvalidOperationException($"Cannot find {variant.Size} {variant.Name} icon of color {variant.Color}."); } return(_icons[variant]); }
public static Texture2D Primitive(IconSize size = IconSize.Large, IconColor color = IconColor.Gray) => Instance.GetItem(PrimitiveName, size, color);
public Texture2D Lookup <T>(T mb, IconSize size = IconSize.Large, IconColor color = IconColor.Gray) where T : class { switch (mb) { case BallRollerComponent _: return(Icons.BallRoller(size, color)); case BumperComponent _: return(Icons.Bumper(size, color)); case CannonRotatorComponent _: return(Icons.Cannon(size, color)); case DropTargetComponent _: return(Icons.DropTarget(size, color)); case DropTargetBankComponent _: return(Icons.DropTargetBank(size, color)); case FlipperComponent _: return(Icons.Flipper(size, color)); case GateComponent _: return(Icons.Gate(size, color)); case GateLifterComponent _: return(Icons.GateLifter(size, color)); case HitTargetComponent _: return(Icons.HitTarget(size, color)); case KickerComponent _: return(Icons.Kicker(size, color)); case LightComponent _: return(Icons.Light(size, color)); case LightGroupComponent _: return(Icons.LightGroup(size, color)); case PlungerComponent _: return(Icons.Plunger(size, color)); case PlayfieldComponent _: return(Icons.Playfield(size, color)); case PrimitiveComponent _: return(Icons.Primitive(size, color)); case RampComponent _: return(Icons.Ramp(size, color)); case RotatorComponent _: return(Icons.Rotator(size, color)); case RubberComponent _: return(Icons.Rubber(size, color)); case ScoreReelDisplayComponent _: return(Icons.ScoreReel(size, color)); case ScoreReelComponent _: return(Icons.ScoreReelSimple(size, color)); case SpinnerComponent _: return(Icons.Spinner(size, color)); case SlingshotComponent _: return(Icons.Slingshot(size, color)); case SurfaceComponent _: return(Icons.Surface(size, color)); case StepRotatorMechComponent _: return(Icons.Mech(size, color)); case TeleporterComponent _: return(Icons.Teleporter(size, color)); case TriggerComponent _: return(Icons.Trigger(size, color)); case TroughComponent _: return(Icons.Trough(size, color)); case MetalWireGuideComponent _: return(Icons.MetalWireGuide(size, color)); case CollisionSwitchComponent _: return(Icons.Switch(false, size, color)); default: return(null); } }
public MapIconBlockItem(IconSize size, IconColor iconColor, IconShape iconShape) : base(size, iconColor, iconShape) { }
public static Texture2D Playfield(IconSize size = IconSize.Large, IconColor color = IconColor.Gray) => Instance.GetItem(PlayfieldName, size, color);
public static Texture2D ByComponent <T>(T mb, IconSize size = IconSize.Large, IconColor color = IconColor.Gray) where T : class { return(Lookups .Select(lookup => lookup.Lookup(mb, size, color)) .FirstOrDefault(icon => icon != null)); }
public static void Initialize(string gameName, string displayGameName, string developer, IconColor iconColor) { Release(); m_gameName = gameName; m_client = new GameSenseClient(); m_client.RegisterGame(gameName, displayGameName, developer, iconColor); m_client.EnableHeartbeat(gameName, true); }
public IconVariant(string name, IconSize size, IconColor color) { _name = name; _size = size; _color = color; }
public static Texture2D ByComponent <T>(T mb, IconSize size = IconSize.Large, IconColor color = IconColor.Gray) where T : class { switch (mb) { case BumperAuthoring _: return(Bumper(size, color)); case FlipperAuthoring _: return(Flipper(size, color)); case GateAuthoring _: return(Gate(size, color)); case KickerAuthoring _: return(Kicker(size, color)); case LightAuthoring _: return(Light(size, color)); case PlungerAuthoring _: return(Plunger(size, color)); case PrimitiveAuthoring _: return(Primitive(size, color)); case RampAuthoring _: return(Ramp(size, color)); case RubberAuthoring _: return(Rubber(size, color)); case SpinnerAuthoring _: return(Spinner(size, color)); case SurfaceAuthoring _: return(Surface(size, color)); case HitTargetAuthoring _: return(Target(size, color)); case TriggerAuthoring _: return(Trigger(size, color)); default: return(null); } }
protected IconBlockItem(IconSize size, IconColor color, IconShape shape) { Size = size; Color = color; Shape = shape; }
public void RegisterGame(string gameName, string displayName, string developer, IconColor iconColor) { string msg = $@" {{ ""game"": ""{gameName}"", ""game_display_name"": ""{displayName}"", ""developer"": ""{developer}"", ""icon_color_id"": {(int)iconColor} }}"; SendCustomMessage("game_metadata", msg); }
public static Texture2D Surface(IconSize size = IconSize.Large, IconColor color = IconColor.Gray) => Instance.GetItem(SurfaceName, size, color);
public static Texture2D Light(IconSize size = IconSize.Large, IconColor color = IconColor.Gray) => Instance.GetItem(LightName, size, color);
public static Texture2D Switch(bool normallyClosed, IconSize size = IconSize.Large, IconColor color = IconColor.Gray) => Instance.GetItem(normallyClosed ? SwitchNcName : SwitchNoName, size, color);
public Texture2D Lookup <T>(T mb, IconSize size = IconSize.Large, IconColor color = IconColor.Gray) where T : class { return(mb switch { PinMameMechComponent _ => Icons.MechPinMame(size, color), _ => null });
public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) { if (!isVisible) { output.SuppressOutput(); } else { var embeddedContent = await output.GetChildContentAsync(); output.TagName = "div"; output.AddCssClass("icon-card-body"); if (!IsCard) { output.AddCssClass(Class); } #region << Init wrappers >> var cardWrapperEl = new TagBuilder("div"); cardWrapperEl.AddCssClass("card icon-card"); if (IsClickable) { cardWrapperEl.AddCssClass("clickable"); } cardWrapperEl.AddCssClass(Class); if (HasShadow) { cardWrapperEl.AddCssClass("shadow-sm"); } if (!String.IsNullOrWhiteSpace(Id)) { cardWrapperEl.Attributes.Add("id", Id); } var cardBodyWrapperEl = new TagBuilder("div"); cardBodyWrapperEl.AddCssClass("card-body p-2"); if (IsCard) { output.PreElement.AppendHtml(cardWrapperEl.RenderStartTag()); output.PreElement.AppendHtml(cardBodyWrapperEl.RenderStartTag()); output.PostElement.AppendHtml(cardBodyWrapperEl.RenderEndTag()); output.PostElement.AppendHtml(embeddedContent); output.PostElement.AppendHtml(cardWrapperEl.RenderEndTag()); } #endregion var IconEl = new TagBuilder("i"); IconEl.AddCssClass("icon"); IconEl.AddCssClass(IconClass); if (IconColor != WvColor.Default) { IconEl.AddCssClass("go-" + IconColor.GetLabel()); } if (!IsIconRight) { output.Content.AppendHtml(IconEl); } var metaEl = new TagBuilder("div"); metaEl.AddCssClass("meta"); var metaTitleEl = new TagBuilder("div"); metaTitleEl.AddCssClass("title"); metaTitleEl.InnerHtml.AppendHtml(Title); metaEl.InnerHtml.AppendHtml(metaTitleEl); var metaDescriptionEl = new TagBuilder("div"); metaDescriptionEl.AddCssClass("description"); metaDescriptionEl.InnerHtml.AppendHtml(Description); metaEl.InnerHtml.AppendHtml(metaDescriptionEl); output.Content.AppendHtml(metaEl); if (IsIconRight) { output.Content.AppendHtml(IconEl); } if (!String.IsNullOrWhiteSpace(BodyLink)) { var linkEl = new TagBuilder("a"); linkEl.AddCssClass("link"); linkEl.Attributes.Add("href", BodyLink); linkEl.InnerHtml.AppendHtml("<em></em>"); output.Content.AppendHtml(linkEl); } } }
public Icon SetIconColor(IconColor color) { this.component.Color = color; return this; }
public static Texture2D Kicker(IconSize size = IconSize.Large, IconColor color = IconColor.Gray) => Instance.GetItem(KickerName, size, color);
public ThemeComponent AddComponent(ThemeComponentType componentType, string componentName, IconSize componentIconSize, IconColor componentIconColor, IconShape componentIconShape) { if (ComponentExists(componentType, componentName)) { return(Items.FirstOrDefault(t => t.ComponentName == componentName && t.ComponentType == componentType)); } var component = new IconThemeComponent(componentType, componentName, componentIconSize, componentIconColor, componentIconShape); Items.Add(component); return(component); }
public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) { var embeddedContent = await output.GetChildContentAsync(); output.TagName = "div"; output.AddCssClass("icon-card-body"); if (!IsCard) { output.AddCssClass(Class); } #region << Init wrappers >> var cardWrapperEl = new TagBuilder("div"); cardWrapperEl.AddCssClass("card icon-card"); if (IsClickable) { cardWrapperEl.AddCssClass("clickable"); } cardWrapperEl.AddCssClass(Class); if (HasShadow) { cardWrapperEl.AddCssClass("shadow-sm"); } var cardBodyWrapperEl = new TagBuilder("div"); cardBodyWrapperEl.AddCssClass("card-body p-2"); if (IsCard) { output.PreElement.AppendHtml(cardWrapperEl.RenderStartTag()); output.PreElement.AppendHtml(cardBodyWrapperEl.RenderStartTag()); output.PostElement.AppendHtml(cardBodyWrapperEl.RenderEndTag()); output.PostElement.AppendHtml(embeddedContent); output.PostElement.AppendHtml(cardWrapperEl.RenderEndTag()); } #endregion var IconEl = new TagBuilder("i"); IconEl.AddCssClass("icon"); IconEl.AddCssClass(IconClass); if (IconColor != ErpColor.Default) { IconEl.AddCssClass("go-" + IconColor.GetLabel()); } output.Content.AppendHtml(IconEl); var metaEl = new TagBuilder("div"); metaEl.AddCssClass("meta"); var metaTitleEl = new TagBuilder("div"); metaTitleEl.AddCssClass("title"); metaTitleEl.InnerHtml.AppendHtml(Title); metaEl.InnerHtml.AppendHtml(metaTitleEl); var metaDescriptionEl = new TagBuilder("div"); metaDescriptionEl.AddCssClass("description"); metaDescriptionEl.InnerHtml.AppendHtml(Description); metaEl.InnerHtml.AppendHtml(metaDescriptionEl); output.Content.AppendHtml(metaEl); }
public static Texture2D Trough(IconSize size = IconSize.Large, IconColor color = IconColor.Gray) => Instance.GetItem(TroughName, size, color);
public NavigationDropDown SetIcon(Icon iconType, IconColor color) { if (this.Component.LinkIcon == null) { this.Component.LinkIcon = new Helpers.IconHelper.Icon(); } this.Component.LinkIcon.SetIconType(iconType); this.Component.LinkIcon.SetIconColor(color); return this; }
public GamesenseClient(string gameName, string gameDisplayName, IconColor iconColor) : this(gameName, gameDisplayName, (int)iconColor) { }