Esempio n. 1
0
        public static void LuaGetLineType(ILuaExecuter executer)
        {
            var parameters = executer.PopParameters();
            var input      = parameters[0] as IInputField;

            if (null != input)
            {
                executer.PushResult(input.LineType);
            }
        }
Esempio n. 2
0
        public static void LuaGetOption(ILuaExecuter executer)
        {
            var parameters = executer.PopParameters();
            var dropdown   = parameters[0] as IDropDown;

            if (null != dropdown && null != parameters[1])
            {
                var index = Convert.ToInt32(parameters[1]);
                executer.PushResult(dropdown.GetOption(index));
            }
        }
Esempio n. 3
0
        public static void LuaGetTextColor(ILuaExecuter executer)
        {
            var parameters = executer.PopParameters();
            var label      = parameters[0] as ILabel;

            if (null != label)
            {
                var color = label.Color;
                executer.PushResult(color.r);
                executer.PushResult(color.g);
                executer.PushResult(color.b);
                executer.PushResult(color.a);
            }
            else
            {
                executer.PushResult(0);
                executer.PushResult(0);
                executer.PushResult(0);
                executer.PushResult(0);
            }
        }