public void OnInfoIconClick(GameObject clickedObject) { InfoIcon icon = clickedObject.GetComponent <InfoIcon>(); icon.SetEnabled(false); this.InfoPanelManager.Add(icon); this.PhotoCapturer.TakePicture(); }
public PlayerInfoTable() : base(DrawHelper.CenteredToScreenWidth(600), DrawHelper.CenteredToScreenHeight(600), "Guest", 600, 600) { IsZeroApplicaple = true; Icons = new InfoIcon(265, 45, onInventory, onStats); Inventory = new InventoryView(100, 325); StatsView = new StatView(50, 125); AddChild(Inventory); AddChild(Icons); Title.SpriteColor = new Color(249, 214, 214); Title.Y = 13; }
public static void ReleaseAll() { InfoIcon.Dispose(); WarningIcon.Dispose(); QuestionIcon.Dispose(); }
/// <summary> /// Converts a property into a node. /// </summary> /// <param name="thing">The object.</param> /// <param name="property">The property to convert.</param> /// <param name="optionsLookup">The options.</param> /// <returns>The node if it can be converted, otherwise null.</returns> public static PropertyNode?ToNode(object?thing, PropertyInfo property, ILookup <string, PropertyInfo>?optionsLookup = null) { MethodInfo?getParameters = thing?.GetType().GetMethod($"GetParameters{property.Name}"); CompiledAttribute? compiled = property.GetCustomAttribute <CompiledAttribute>(); HideInEditorAttribute?hideInEditor = property.GetCustomAttribute <HideInEditorAttribute>(); InfoIcon[] icons = property.GetCustomAttributes <EditorIconAttribute>().Select(a => InfoIcon.Get(a.Icon)).ToArray(); ElementInfo info = new ElementInfo( name: property.Name.Split("_").Last(), description: DescriptionProvider.GetDescription(property), propertyType: property.PropertyType, nullable: property.IsNullable(), getValue: prop => property.GetValue(thing), setValue: (prop, value) => property.SetValue(thing, value), getCompiledParameters: getParameters != null ? prop => getParameters?.Invoke(thing, null) as IList <CompiledVariable> ?? new List <CompiledVariable>() : (Func <PropertyNode, IList <CompiledVariable> >?)null, compiled: compiled, hiddenInEditorCondition: (hideInEditor == null || thing == null) ? null : (thing, hideInEditor.Condition), icons: icons) { ControlsDefinitionName = property.GetCustomAttribute <ControlsDefinitionNameAttribute>() != null, }; return(ToNode(thing, info, optionsLookup)); }