コード例 #1
0
 protected void ButtonTextBaseSetting(EzGui_Button_Outline _Button, SpriteRoot.ANCHOR_METHOD _Anchor, string _Text, EZValueChangedDelegate _Del)
 {
     _Button.SetAnchor(_Anchor);
     _Button.SetAnchor(SpriteText.Anchor_Pos.Middle_Center);
     _Button.SetTextureSize(80.0f, 40.0f);
     _Button.SetFontPos(-40.0f, 20.0f);
     _Button.SetText(_Text);
     _Button.SetValueChangedDelegate(_Del);
 }
コード例 #2
0
    public override void Copy(SpriteRoot s, ControlCopyFlags flags)
    {
        base.Copy(s, flags);

        if (!(s is UITextField))
        {
            return;
        }

        UITextField b = (UITextField)s;


        if ((flags & ControlCopyFlags.Settings) == ControlCopyFlags.Settings)
        {
            maxLength        = b.maxLength;
            multiline        = b.multiline;
            password         = b.password;
            maskingCharacter = b.maskingCharacter;
            customKeyboard   = b.customKeyboard;
            customFocusEvent = b.customFocusEvent;
            margins          = b.margins;

#if UNITY_IPHONE || UNITY_ANDROID
            type        = b.type;
            autoCorrect = b.autoCorrect;
            alert       = b.alert;
            hideInput   = b.hideInput;
#endif
            typingSoundEffect = b.typingSoundEffect;
            fieldFullSound    = b.fieldFullSound;
        }

        if ((flags & ControlCopyFlags.Invocation) == ControlCopyFlags.Invocation)
        {
            scriptWithMethodToInvoke = b.scriptWithMethodToInvoke;
            methodToInvoke           = b.methodToInvoke;
        }

        if ((flags & ControlCopyFlags.Appearance) == ControlCopyFlags.Appearance)
        {
            caret.Copy(b.caret);

            caretSize         = b.caretSize;
            caretOffset       = b.caretOffset;
            caretAnchor       = b.caretAnchor;
            showCaretOnMobile = b.showCaretOnMobile;
        }

        if ((flags & ControlCopyFlags.State) == ControlCopyFlags.State)
        {
            insert = b.insert;
            Text   = b.Text;
        }

        SetMargins(margins);
    }
コード例 #3
0
 public virtual void Copy(SpriteRoot s)
 {
     if (!this.managed)
     {
         if (this.m_spriteMesh != null && s.spriteMesh != null)
         {
             ((SpriteMesh)this.m_spriteMesh).material = s.spriteMesh.material;
         }
         else if (!s.managed)
         {
             base.renderer.sharedMaterial = s.renderer.sharedMaterial;
         }
     }
     this.drawLayer = s.drawLayer;
     if (s.renderCamera != null)
     {
         this.SetCamera(s.renderCamera);
     }
     if (this.renderCamera == null)
     {
         this.renderCamera = Camera.main;
     }
     if (this.m_spriteMesh != null)
     {
         if (this.m_spriteMesh.texture != null)
         {
             this.SetPixelToUV(this.m_spriteMesh.texture);
         }
         else if (!this.managed)
         {
             ((SpriteMesh)this.m_spriteMesh).material = base.renderer.sharedMaterial;
             this.SetPixelToUV(this.m_spriteMesh.texture);
         }
     }
     this.plane             = s.plane;
     this.winding           = s.winding;
     this.offset            = s.offset;
     this.anchor            = s.anchor;
     this.bleedCompensation = s.bleedCompensation;
     this.autoResize        = s.autoResize;
     this.pixelPerfect      = s.pixelPerfect;
     this.uvRect            = s.uvRect;
     this.scaleFactor       = s.scaleFactor;
     this.topLeftOffset     = s.topLeftOffset;
     this.bottomRightOffset = s.bottomRightOffset;
     this.width             = s.width;
     this.height            = s.height;
     this.m_sprTile         = s.m_sprTile;
     this.m_v3TotalVertices = s.m_v3TotalVertices;
     this.SetColor(s.color);
 }
コード例 #4
0
 public virtual void Mirror(SpriteRoot s)
 {
     this.managed           = s.managed;
     this.manager           = s.manager;
     this.drawLayer         = s.drawLayer;
     this.plane             = s.plane;
     this.winding           = s.winding;
     this.width             = s.width;
     this.height            = s.height;
     this.bleedCompensation = s.bleedCompensation;
     this.anchor            = s.anchor;
     this.offset            = s.offset;
     this.color             = s.color;
     this.pixelPerfect      = s.pixelPerfect;
     this.autoResize        = s.autoResize;
     this.renderCamera      = s.renderCamera;
     this.hideAtStart       = s.hideAtStart;
 }
コード例 #5
0
 public void SetAnchor(SpriteRoot.ANCHOR_METHOD _Ancor)
 {
     EZGUI_ProgressBar.anchor = _Ancor;
 }
コード例 #6
0
	public override void Copy(SpriteRoot s, ControlCopyFlags flags)
	{
		base.Copy(s, flags);

		if (!(s is UITextField))
			return;

		UITextField b = (UITextField)s;


		if ((flags & ControlCopyFlags.Settings) == ControlCopyFlags.Settings)
		{
			maxLength = b.maxLength;
			multiline = b.multiline;
			password = b.password;
			maskingCharacter = b.maskingCharacter;
			customKeyboard = b.customKeyboard;
			customFocusEvent = b.customFocusEvent;
			margins = b.margins;

#if UNITY_IPHONE || UNITY_ANDROID
			type = b.type;
			autoCorrect = b.autoCorrect;
			alert = b.alert;
			hideInput = b.hideInput;
#endif
			typingSoundEffect = b.typingSoundEffect;
			fieldFullSound = b.fieldFullSound;
		}

		if ((flags & ControlCopyFlags.Invocation) == ControlCopyFlags.Invocation)
		{
			scriptWithMethodToInvoke = b.scriptWithMethodToInvoke;
			methodToInvoke = b.methodToInvoke;
		}

		if ((flags & ControlCopyFlags.Appearance) == ControlCopyFlags.Appearance)
		{
			caret.Copy(b.caret);

			caretSize = b.caretSize;
			caretOffset = b.caretOffset;
			caretAnchor = b.caretAnchor;
			showCaretOnMobile = b.showCaretOnMobile;
		}

		if ((flags & ControlCopyFlags.State) == ControlCopyFlags.State)
		{
			insert = b.insert;
			Text = b.Text;
		}

		SetMargins(margins);
	}
コード例 #7
0
 public void SetAnchor(SpriteRoot.ANCHOR_METHOD _Ancor)
 {
     EZGUI_Texture.anchor = _Ancor;
 }
コード例 #8
0
ファイル: EzGui_Button.cs プロジェクト: hhs900110/ProjectKT
 public void SetAnchor(SpriteRoot.ANCHOR_METHOD _Ancor)
 {
     EZGUI_Button.anchor = _Ancor;
 }
コード例 #9
0
 public void SetAnchor(SpriteRoot.ANCHOR_METHOD a)
 {
     this.anchor = a;
     this.SetSize(this.width, this.height);
 }