UILabel.OnFill C# (CSharp) Méthode

OnFill() public méthode

Draw the label.
public OnFill ( BetterList verts, BetterList uvs, BetterList cols ) : void
verts BetterList
uvs BetterList
cols BetterList
Résultat void
	public override void OnFill (BetterList<Vector3> verts, BetterList<Vector2> uvs, BetterList<Color32> cols)
	{
		if (!isValid) return;

		int offset = verts.size;
		Color col = color;
		col.a = finalAlpha;
		if (mFont != null && mFont.premultipliedAlpha) col = NGUITools.ApplyPMA(col);

		string text = processedText;
		float pixelSize = (mFont != null) ? mFont.pixelSize : 1f;
		int start = verts.size;

		UpdateNGUIText(defaultFontSize, mWidth, mHeight);

		NGUIText.tint = col;
		NGUIText.Print(text, verts, uvs, cols);

		// Center the content within the label vertically
		Vector2 pos = ApplyOffset(verts, start);

		// Apply an effect if one was requested
		if (effectStyle != Effect.None)
		{
			int end = verts.size;
			float pixel = pixelSize;
			pos.x = pixel * mEffectDistance.x;
			pos.y = pixel * mEffectDistance.y;

			ApplyShadow(verts, uvs, cols, offset, end, pos.x, -pos.y);

			if (effectStyle == Effect.Outline)
			{
				offset = end;
				end = verts.size;

				ApplyShadow(verts, uvs, cols, offset, end, -pos.x, pos.y);

				offset = end;
				end = verts.size;

				ApplyShadow(verts, uvs, cols, offset, end, pos.x, pos.y);

				offset = end;
				end = verts.size;

				ApplyShadow(verts, uvs, cols, offset, end, -pos.x, -pos.y);
			}
		}
	}

Usage Example

    static int OnFill(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 4);
        UILabel obj = (UILabel)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UILabel");
        BetterList <Vector3> arg0 = (BetterList <Vector3>)LuaScriptMgr.GetNetObject(L, 2, typeof(BetterList <Vector3>));
        BetterList <Vector2> arg1 = (BetterList <Vector2>)LuaScriptMgr.GetNetObject(L, 3, typeof(BetterList <Vector2>));
        BetterList <Color32> arg2 = (BetterList <Color32>)LuaScriptMgr.GetNetObject(L, 4, typeof(BetterList <Color32>));

        obj.OnFill(arg0, arg1, arg2);
        return(0);
    }
All Usage Examples Of UILabel::OnFill