public static void Draw(AnimBool expanded, ColorName colorName, CaretType caretType, float size) { switch (caretType) { case CaretType.Caret: AnimatedTexture.Draw(expanded, Carets, size, colorName); break; case CaretType.Move: AnimatedTexture.Draw(expanded, MoveCarets, size, colorName); break; case CaretType.Rotate: AnimatedTexture.Draw(expanded, RotateCarets, size, colorName); break; case CaretType.Scale: AnimatedTexture.Draw(expanded, ScaleCarets, size, colorName); break; case CaretType.Fade: AnimatedTexture.Draw(expanded, FadeCarets, size, colorName); break; } }
public Caret() { _style = CaretType.Box; _color = Color.Empty; _enabled = false; _blink = true; }
void setCaretType(CaretType type) { if (caret != null) { RemoveVisualChild(caret); } switch (type) { case CaretType.VerticalLine: caret = verticalLineCaret; break; case CaretType.Block: caret = blockCaret; break; case CaretType.Underline: caret = underlineCaret; break; } AddVisualChild(caret); updateCaret(); }
public Caret() { _style = CaretType.Box; _color = Color.Empty; _enabled = false; _blink = true; }
private static int CaretTypeToIndex(CaretType t) { switch (t) { case CaretType.Box: return(0); case CaretType.Line: return(1); case CaretType.Underline: return(2); case CaretType.BoldUnderline: return(3); default: return(0); } }
private static int CaretTypeToIndex(CaretType t) { int i = 0; if ((t & CaretType.StyleMask) == CaretType.Box) { i = 0; } else if ((t & CaretType.StyleMask) == CaretType.Line) { i = 1; } else if ((t & CaretType.StyleMask) == CaretType.Underline) { i = 2; } return(i); }
private static Texture[] GetCarets(CaretType caretType) { string textureName = "Caret" + (caretType != CaretType.Caret ? caretType.ToString() : ""); return(AnimatedTexture.GetAnimatedTextureArray(textureName, DoozyPath.EDITOR_IMAGES_PATH, false)); }
void setCaretType(CaretType type) { if (caret != null) RemoveVisualChild(caret); switch (type) { case CaretType.VerticalLine: caret = verticalLineCaret; break; case CaretType.Block: caret = blockCaret; break; case CaretType.Underline: caret = underlineCaret; break; } AddVisualChild(caret); updateCaret(); }
private static int CaretTypeToIndex(CaretType t) { int i = 0; if((t & CaretType.StyleMask)==CaretType.Box) i = 0; else if((t & CaretType.StyleMask)==CaretType.Line) i = 1; else if((t & CaretType.StyleMask)==CaretType.Underline) i = 2; return i; }