83 lines
4.1 KiB
C#
83 lines
4.1 KiB
C#
// PASS-9 STUB: 1,430-line NGUI static text-rendering utility reduced to compile-time
|
|
// surface. All callers (UIInput, Wizard/RubyText) are UI-side. No receive-path callers.
|
|
// See Task 5 of PASS8-PLAN.md.
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using UnityEngine;
|
|
using Wizard;
|
|
|
|
public static class NGUIText
|
|
{
|
|
public enum Alignment { Automatic, Left, Center, Right, Justified }
|
|
public enum SymbolStyle { None, Normal, Colored }
|
|
|
|
public class GlyphInfo
|
|
{
|
|
public Vector2 v0;
|
|
public Vector2 v1;
|
|
public Vector2 u0;
|
|
public Vector2 u1;
|
|
public Vector2 u2;
|
|
public Vector2 u3;
|
|
public float advance;
|
|
public bool rotated;
|
|
public int channel;
|
|
}
|
|
|
|
// Static fields — defaults matching original initializers
|
|
public static UIFont bitmapFont;
|
|
public static UnityEngine.Font dynamicFont;
|
|
public static GlyphInfo glyph = new GlyphInfo();
|
|
public static int fontSize = 16;
|
|
public static float fontScale = 1f;
|
|
public static float pixelDensity = 1f;
|
|
public static FontStyle fontStyle = FontStyle.Normal;
|
|
public static Alignment alignment = Alignment.Left;
|
|
public static Color tint = Color.white;
|
|
public static int rectWidth = 1000000;
|
|
public static int rectHeight = 1000000;
|
|
public static int regionWidth = 1000000;
|
|
public static int regionHeight = 1000000;
|
|
public static int maxLines = 0;
|
|
public static bool gradient = false;
|
|
public static Color gradientBottom = Color.white;
|
|
public static Color gradientTop = Color.white;
|
|
public static bool encoding = false;
|
|
public static float spacingX = 0f;
|
|
public static float spacingY = 0f;
|
|
public static bool premultiply = false;
|
|
public static SymbolStyle symbolStyle;
|
|
public static int finalSize = 0;
|
|
public static float finalSpacingX = 0f;
|
|
public static float finalLineHeight = 0f;
|
|
public static float baseline = 0f;
|
|
public static bool useSymbols = false;
|
|
|
|
// Static methods — all no-ops or default returns
|
|
public static void Update(UIWidget.Pivot piv) { }
|
|
public static void Update(bool request, UIWidget.Pivot piv) { }
|
|
public static void Prepare(string text) { }
|
|
public static BMSymbol GetSymbol(string text, int index, int textLength) => null;
|
|
public static float GetGlyphWidth(int ch, int prev) => 0f;
|
|
public static GlyphInfo GetGlyph(int ch, int prev) => null;
|
|
public static Color ParseColor24(string text, int offset) => Color.white;
|
|
public static Color ParseColor32(string text, int offset) => Color.white;
|
|
public static string EncodeColor(Color c) => "";
|
|
public static string EncodeColor24(Color c) => "";
|
|
public static string EncodeColor32(Color c) => "";
|
|
public static bool ParseSymbol(string text, ref int index) => false;
|
|
public static bool IsHex(char ch) => false;
|
|
public static string StripSymbols(string text) => text;
|
|
public static void Align(BetterList<Vector3> verts, int indexOffset, float printedWidth, int elements = 4) { }
|
|
public static int GetExactCharacterIndex(BetterList<Vector3> verts, BetterList<int> indices, Vector2 pos) => 0;
|
|
public static int GetApproximateCharacterIndex(BetterList<Vector3> verts, BetterList<int> indices, Vector2 pos) => 0;
|
|
public static void EndLine(ref StringBuilder s) { }
|
|
public static Vector2 CalculatePrintedSize(string text) => Vector2.zero;
|
|
public static int CalculateOffsetToFit(string text) => 0;
|
|
public static bool WrapText(string text, out string finalText, bool wrapLineColors = false) { finalText = text; return false; }
|
|
public static bool WrapText(string text, out string finalText, bool keepCharCount, bool wrapLineColors, bool useEllipsis = false) { finalText = text; return false; }
|
|
public static void PrintApproximateCharacterPositions(string text, BetterList<Vector3> verts, BetterList<int> indices) { }
|
|
public static void PrintExactCharacterPositions(string text, BetterList<Vector3> verts, BetterList<int> indices) { }
|
|
public static void PrintCaretAndSelection(string text, int start, int end, BetterList<Vector3> caret, BetterList<Vector3> highlight) { }
|
|
}
|