/** * <summary>Draws the element using OnGUI</summary> * <param name = "_style">The GUIStyle to draw with</param> * <param name = "_slot">Ignored by this subclass</param> * <param name = "zoom">The zoom factor</param> * <param name = "isActive">If True, then the element will be drawn as though highlighted</param> */ public override void Display(GUIStyle _style, int _slot, float zoom, bool isActive) { base.Display(_style, _slot, zoom, isActive); _style.wordWrap = true; _style.alignment = anchor; if (zoom < 1f) { _style.fontSize = (int)((float)_style.fontSize * zoom); } if (pages.Count >= showPage) { if (textEffects != TextEffects.None) { AdvGame.DrawTextEffect(ZoomRect(relativeRect, zoom), fullText, _style, Color.black, _style.normal.textColor, outlineSize, textEffects); } else { GUI.Label(ZoomRect(relativeRect, zoom), fullText, _style); } } }
/** * <summary>Draws the element using OnGUI</summary> * <param name = "_style">The GUIStyle to draw with</param> * <param name = "_slot">The index number of the slot to display</param> * <param name = "zoom">The zoom factor</param> * <param name = "isActive If True, then the element will be drawn as though highlighted</param> */ public override void Display(GUIStyle _style, int _slot, float zoom, bool isActive) { base.Display(_style, _slot, zoom, isActive); if (fixedOption) { _slot = 0; } if (markAlreadyChosen) { if (chosens[_slot]) { if (isActive) { _style.normal.textColor = alreadyChosenFontHighlightedColour; } else { _style.normal.textColor = alreadyChosenFontColour; } } else if (isActive) { _style.normal.textColor = fontHighlightColor; } else { _style.normal.textColor = fontColor; } } _style.wordWrap = true; _style.alignment = anchor; if (zoom < 1f) { _style.fontSize = (int)((float)_style.fontSize * zoom); } if (displayType == ConversationDisplayType.TextOnly) { if (textEffects != TextEffects.None) { AdvGame.DrawTextEffect(ZoomRect(GetSlotRectRelative(_slot), zoom), labels [_slot], _style, Color.black, _style.normal.textColor, outlineSize, textEffects); } else { GUI.Label(ZoomRect(GetSlotRectRelative(_slot), zoom), labels [_slot], _style); } } else { if (Application.isPlaying && icons[_slot] != null) { icons[_slot].DrawAsInteraction(ZoomRect(GetSlotRectRelative(_slot), zoom), isActive); } else if (testIcon != null) { GUI.DrawTexture(ZoomRect(GetSlotRectRelative(_slot), zoom), testIcon, ScaleMode.StretchToFill, true, 0f); } GUI.Label(ZoomRect(GetSlotRectRelative(_slot), zoom), "", _style); } }
public override void Display(GUIStyle _style, int _slot, float zoom, bool isActive) { base.Display(_style, _slot, zoom, isActive); _style.wordWrap = true; _style.alignment = anchor; if (zoom < 1f) { _style.fontSize = (int)((float)_style.fontSize * zoom); } if (fixedIcon) { if (displayType != AC_DisplayType.IconOnly) { if (textEffects != TextEffects.None) { AdvGame.DrawTextEffect(ZoomRect(relativeRect, zoom), labels[0], _style, Color.black, _style.normal.textColor, outlineSize, textEffects); } else { GUI.Label(ZoomRect(relativeRect, zoom), labels[0], _style); } } else { GUI.Label(ZoomRect(relativeRect, zoom), string.Empty, _style); } if (overrideTexture) { if (iconID >= 0 && KickStarter.playerCursor.GetSelectedCursorID() == iconID && activeTexture != null) { GUI.DrawTexture(ZoomRect(relativeRect, zoom), activeTexture, ScaleMode.StretchToFill, true, 0f); } } else { if (displayType != AC_DisplayType.TextOnly && icon != null) { icon.DrawAsInteraction(ZoomRect(relativeRect, zoom), isActive); } } } else { if (displayType != AC_DisplayType.IconOnly) { if (textEffects != TextEffects.None) { AdvGame.DrawTextEffect(ZoomRect(GetSlotRectRelative(_slot), zoom), labels[_slot], _style, Color.black, _style.normal.textColor, outlineSize, textEffects); } else { GUI.Label(ZoomRect(GetSlotRectRelative(_slot), zoom), labels[_slot], _style); } } else { GUI.Label(ZoomRect(GetSlotRectRelative(_slot), zoom), string.Empty, _style); } CursorIcon _icon = GetIconAtSlot(_slot); if (displayType != AC_DisplayType.TextOnly && _icon != null) { _icon.DrawAsInteraction(ZoomRect(GetSlotRectRelative(_slot), zoom), isActive); } } }