Inheritance: GObject, IColorGear
Exemplo n.º 1
0
    public override void ConstructFromXML(FairyGUI.Utils.XML cxml)
    {
        base.ConstructFromXML(cxml);

        _timeText = this.GetChild("timeText").asTextField;
        _readController = this.GetController("IsRead");
        _fetchController = this.GetController("c1");
        _trans = this.GetTransition("t0");
    }
Exemplo n.º 2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="textField"></param>
 public TypingEffect(GTextField textField)
 {
     if (textField is GRichTextField)
         _textField = ((RichTextField)textField.displayObject).textField;
     else
         _textField = (TextField)textField.displayObject;
     _textField.EnableCharPositionSupport();
     _backupVerts = new List<Vector3>();
 }
Exemplo n.º 3
0
    void Start()
    {
        Application.targetFrameRate = 60;
        Stage.inst.onKeyDown.Add(OnKeyDown);

        _mainView = this.GetComponent<UIPanel>().ui;

        _text = _mainView.GetChild("n9").asTextField;

        _joystick = new JoystickModule(_mainView);
        _joystick.onMove.Add(__joystickMove);
        _joystick.onEnd.Add(__joystickEnd);
    }
 static public int constructor(IntPtr l)
 {
     try {
         FairyGUI.GTextField o;
         o = new FairyGUI.GTextField();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
    public EmitComponent()
    {
        this.touchable = false;

        _symbolLoader = new GLoader();
        _symbolLoader.autoSize = true;
        AddChild(_symbolLoader);

        _numberText = new GTextField();
        _numberText.autoSize = AutoSizeType.Both;

        AddChild(_numberText);
    }
 static public int Setup_AfterAdd(IntPtr l)
 {
     try {
         FairyGUI.GTextField self = (FairyGUI.GTextField)checkSelf(l);
         FairyGUI.Utils.XML  a1;
         checkType(l, 2, out a1);
         self.Setup_AfterAdd(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_autoSize(IntPtr l)
 {
     try {
         FairyGUI.GTextField   self = (FairyGUI.GTextField)checkSelf(l);
         FairyGUI.AutoSizeType v;
         checkEnum(l, 2, out v);
         self.autoSize = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_UBBEnabled(IntPtr l)
 {
     try {
         FairyGUI.GTextField self = (FairyGUI.GTextField)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.UBBEnabled = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_shadowOffset(IntPtr l)
 {
     try {
         FairyGUI.GTextField self = (FairyGUI.GTextField)checkSelf(l);
         UnityEngine.Vector2 v;
         checkType(l, 2, out v);
         self.shadowOffset = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_strokeColor(IntPtr l)
 {
     try {
         FairyGUI.GTextField self = (FairyGUI.GTextField)checkSelf(l);
         UnityEngine.Color   v;
         checkType(l, 2, out v);
         self.strokeColor = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_verticalAlign(IntPtr l)
 {
     try {
         FairyGUI.GTextField    self = (FairyGUI.GTextField)checkSelf(l);
         FairyGUI.VertAlignType v;
         checkEnum(l, 2, out v);
         self.verticalAlign = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int HandleControllerChanged(IntPtr l)
 {
     try {
         FairyGUI.GTextField self = (FairyGUI.GTextField)checkSelf(l);
         FairyGUI.Controller a1;
         checkType(l, 2, out a1);
         self.HandleControllerChanged(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_textFormat(IntPtr l)
 {
     try {
         FairyGUI.GTextField self = (FairyGUI.GTextField)checkSelf(l);
         FairyGUI.TextFormat v;
         checkType(l, 2, out v);
         self.textFormat = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_emojies(IntPtr l)
 {
     try {
         FairyGUI.GTextField self = (FairyGUI.GTextField)checkSelf(l);
         Dictionary <System.UInt32, FairyGUI.Emoji> v;
         checkType(l, 2, out v);
         self.emojies = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 15
0
 static int FlushVars(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         FairyGUI.GTextField obj = (FairyGUI.GTextField)ToLua.CheckObject <FairyGUI.GTextField>(L, 1);
         obj.FlushVars();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 16
0
 static int HandleControllerChanged(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.GTextField obj  = (FairyGUI.GTextField)ToLua.CheckObject(L, 1, typeof(FairyGUI.GTextField));
         FairyGUI.Controller arg0 = (FairyGUI.Controller)ToLua.CheckObject(L, 2, typeof(FairyGUI.Controller));
         obj.HandleControllerChanged(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 17
0
 static int SetTextFileAutoSize(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.GTextField arg0 = (FairyGUI.GTextField)ToLua.CheckObject(L, 1, typeof(FairyGUI.GTextField));
         int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
         LuaFramework.Util.SetTextFileAutoSize(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 18
0
 static int Setup_AfterAdd(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.GTextField obj  = (FairyGUI.GTextField)ToLua.CheckObject(L, 1, typeof(FairyGUI.GTextField));
         FairyGUI.Utils.XML  arg0 = (FairyGUI.Utils.XML)ToLua.CheckObject(L, 2, typeof(FairyGUI.Utils.XML));
         obj.Setup_AfterAdd(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 19
0
 static int GetTextField(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         FairyGUI.GComboBox  obj = (FairyGUI.GComboBox)ToLua.CheckObject <FairyGUI.GComboBox>(L, 1);
         FairyGUI.GTextField o   = obj.GetTextField();
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 20
0
 static int Setup_AfterAdd(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         FairyGUI.GTextField       obj  = (FairyGUI.GTextField)ToLua.CheckObject <FairyGUI.GTextField>(L, 1);
         FairyGUI.Utils.ByteBuffer arg0 = (FairyGUI.Utils.ByteBuffer)ToLua.CheckObject <FairyGUI.Utils.ByteBuffer>(L, 2);
         int arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
         obj.Setup_AfterAdd(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 21
0
 static int HasCharacter(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.GTextField obj = (FairyGUI.GTextField)ToLua.CheckObject <FairyGUI.GTextField>(L, 1);
         char arg0 = (char)LuaDLL.luaL_checknumber(L, 2);
         bool o    = obj.HasCharacter(arg0);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 22
0
    static int get_text(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GTextField obj = (FairyGUI.GTextField)o;
            string ret = obj.text;
            LuaDLL.lua_pushstring(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index text on a nil value" : e.Message));
        }
    }
Exemplo n.º 23
0
 static int SetVar(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         FairyGUI.GTextField obj = (FairyGUI.GTextField)ToLua.CheckObject <FairyGUI.GTextField>(L, 1);
         string arg0             = ToLua.CheckString(L, 2);
         string arg1             = ToLua.CheckString(L, 3);
         FairyGUI.GTextField o   = obj.SetVar(arg0, arg1);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 24
0
    static int set_autoSize(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GTextField   obj  = (FairyGUI.GTextField)o;
            FairyGUI.AutoSizeType arg0 = (FairyGUI.AutoSizeType)ToLua.CheckObject(L, 2, typeof(FairyGUI.AutoSizeType));
            obj.autoSize = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index autoSize on a nil value" : e.Message));
        }
    }
Exemplo n.º 25
0
    static int set_shadowOffset(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GTextField obj  = (FairyGUI.GTextField)o;
            UnityEngine.Vector2 arg0 = ToLua.ToVector2(L, 2);
            obj.shadowOffset = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index shadowOffset on a nil value" : e.Message));
        }
    }
Exemplo n.º 26
0
    static int set_UBBEnabled(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GTextField obj = (FairyGUI.GTextField)o;
            bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.UBBEnabled = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index UBBEnabled on a nil value" : e.Message));
        }
    }
Exemplo n.º 27
0
    static int set_stroke(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GTextField obj = (FairyGUI.GTextField)o;
            int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
            obj.stroke = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index stroke on a nil value" : e.Message));
        }
    }
Exemplo n.º 28
0
    static int set_strokeColor(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GTextField obj  = (FairyGUI.GTextField)o;
            UnityEngine.Color   arg0 = ToLua.ToColor(L, 2);
            obj.strokeColor = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index strokeColor on a nil value" : e.Message));
        }
    }
Exemplo n.º 29
0
    static int get_autoSize(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GTextField   obj = (FairyGUI.GTextField)o;
            FairyGUI.AutoSizeType ret = obj.autoSize;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index autoSize on a nil value" : e.Message));
        }
    }
Exemplo n.º 30
0
    static int set_textFormat(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GTextField obj  = (FairyGUI.GTextField)o;
            FairyGUI.TextFormat arg0 = (FairyGUI.TextFormat)ToLua.CheckObject(L, 2, typeof(FairyGUI.TextFormat));
            obj.textFormat = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index textFormat on a nil value" : e.Message));
        }
    }
Exemplo n.º 31
0
    static int get_stroke(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GTextField obj = (FairyGUI.GTextField)o;
            int ret = obj.stroke;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index stroke on a nil value" : e.Message));
        }
    }
Exemplo n.º 32
0
    static int get_UBBEnabled(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GTextField obj = (FairyGUI.GTextField)o;
            bool ret = obj.UBBEnabled;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index UBBEnabled on a nil value" : e.Message));
        }
    }
Exemplo n.º 33
0
    static int get_verticalAlign(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GTextField    obj = (FairyGUI.GTextField)o;
            FairyGUI.VertAlignType ret = obj.verticalAlign;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index verticalAlign on a nil value" : e.Message));
        }
    }
Exemplo n.º 34
0
    static int get_color(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GTextField obj = (FairyGUI.GTextField)o;
            UnityEngine.Color   ret = obj.color;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index color on a nil value" : e.Message));
        }
    }
    void Start()
    {
        Application.targetFrameRate = 60;
        GRoot.inst.SetContentScaleFactor(1136, 640);
        Stage.inst.onKeyDown.Add(OnKeyDown);

        UIPackage.AddPackage("UI/Joystick");

        _mainView = UIPackage.CreateObject("Joystick", "Main").asCom;
        _mainView.fairyBatching = true;
        _mainView.SetSize(GRoot.inst.width, GRoot.inst.height);
        _mainView.AddRelation(GRoot.inst, RelationType.Size);
        GRoot.inst.AddChild(_mainView);

        _text = _mainView.GetChild("n9").asTextField;

        _joystick = new JoystickModule(_mainView);
        _joystick.onMove.Add(__joystickMove);
        _joystick.onEnd.Add(__joystickEnd);
    }
Exemplo n.º 36
0
        public override void ConstructFromXML(XML cxml)
        {
            base.ConstructFromXML(cxml);

            XML xml = cxml.GetNode("Slider");

            string str;
            str = xml.GetAttribute("titleType");
            if (str != null)
                _titleType = FieldTypes.ParseProgressTitleType(str);
            else
                _titleType = ProgressTitleType.Percent;

            _titleObject = GetChild("title") as GTextField;
            _barObjectH = GetChild("bar");
            _barObjectV = GetChild("bar_v");
            _aniObject = GetChild("ani") as GMovieClip;
            _gripObject = GetChild("grip");

            if (_barObjectH != null)
            {
                _barMaxWidth = _barObjectH.width;
                _barMaxWidthDelta = this.width - _barMaxWidth;
            }
            if (_barObjectV != null)
            {
                _barMaxHeight = _barObjectV.height;
                _barMaxHeightDelta = this.height - _barMaxHeight;
            }

            if (_gripObject != null)
            {
                _gripObject.onTouchBegin.Add(__gripTouchBegin);
                _gripObject.onTouchEnd.Add(__gripTouchEnd);
            }
        }
Exemplo n.º 37
0
        public override void ConstructFromXML(XML cxml)
        {
            base.ConstructFromXML(cxml);

            XML xml = cxml.GetNode("ComboBox");

            string str;

            _buttonController = GetController("button");
            _titleObject = GetChild("title") as GTextField;

            str = xml.GetAttribute("dropdown");
            if (str != null && str.Length > 0)
            {
                dropdown = UIPackage.CreateObjectFromURL(str) as GComponent;
                if (dropdown == null)
                {
                    Debug.LogWarning("FairyGUI: " + this.resourceURL + " should be a component.");
                    return;
                }

                _list = dropdown.GetChild("list") as GList;
                if (_list == null)
                {
                    Debug.LogWarning("FairyGUI: " + this.resourceURL + ": should container a list component named list.");
                    return;
                }
                _list.onClickItem.Add(__clickItem);

                _list.AddRelation(dropdown, RelationType.Width);
                _list.RemoveRelation(dropdown, RelationType.Height);

                dropdown.AddRelation(_list, RelationType.Height);
                dropdown.RemoveRelation(_list, RelationType.Width);
            }

            displayObject.onRollOver.Add(__rollover);
            displayObject.onRollOut.Add(__rollout);
            displayObject.onTouchBegin.Add(__touchBegin);
            displayObject.onTouchEnd.Add(__touchEnd);
        }
Exemplo n.º 38
0
        public override void ConstructFromXML(XML cxml)
        {
            base.ConstructFromXML(cxml);

            XML xml = cxml.GetNode("ProgressBar");

            string str;
            str = xml.GetAttribute("titleType");
            if (str != null)
                _titleType = FieldTypes.ParseProgressTitleType(str);
            else
                _titleType = ProgressTitleType.Percent;
            _reverse = xml.GetAttributeBool("reverse", false);

            _titleObject = GetChild("title") as GTextField;
            _barObjectH = GetChild("bar");
            _barObjectV = GetChild("bar_v");
            _aniObject = GetChild("ani") as GMovieClip;

            if (_barObjectH != null)
            {
                _barMaxWidth = _barObjectH.width;
                _barMaxWidthDelta = this.width - _barMaxWidth;
                _barStartX = _barObjectH.x;
            }
            if (_barObjectV != null)
            {
                _barMaxHeight = _barObjectV.height;
                _barMaxHeightDelta = this.height - _barMaxHeight;
                _barStartY = _barObjectV.y;
            }
        }