示例#1
0
    static int SetImageIndex(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        MultiImage obj  = (MultiImage)LuaScriptMgr.GetUnityObjectSelf(L, 1, "MultiImage");
        int        arg0 = (int)LuaScriptMgr.GetNumber(L, 2);

        obj.SetImageIndex(arg0);
        return(0);
    }
示例#2
0
    static int SetImageSprite(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 3);
        MultiImage obj  = (MultiImage)LuaScriptMgr.GetUnityObjectSelf(L, 1, "MultiImage");
        int        arg0 = (int)LuaScriptMgr.GetNumber(L, 2);
        Sprite     arg1 = (Sprite)LuaScriptMgr.GetUnityObject(L, 3, typeof(Sprite));

        obj.SetImageSprite(arg0, arg1);
        return(0);
    }
        private async Task Delete(MultiImage parm)
        {
            ImageList.Remove(parm);
            CountPhoto = ImageList.Count + " Photo(s)";
            await Task.FromResult(true);

            // int count=Shell.Current.Navigation.NavigationStack.Count;
            //for (var count = 1; count <= 3; count++)
            //{
            //    Navigation.RemovePage(this.Navigation.NavigationStack[6 - count]);
            //}
            //Navigation.PopAsync();
        }
示例#4
0
        private IObject <ObjectData> ProcessObjectTypeTag(ObjectTypeTag objectTypeTag)
        {
            IObject <ObjectData> newInstance;

            switch (objectTypeTag.Type)
            {
            case ObjectType.Image:
                newInstance = new Image(null);
                break;

            case ObjectType.Group:
                newInstance = new Group(null);
                break;

            case ObjectType.String:
                newInstance = new Text(null);
                break;

            case ObjectType.MultiImage:
                newInstance = new MultiImage(null);
                break;

            case ObjectType.ColoredImage:
                newInstance = new ColoredImage(null);
                break;

            case ObjectType.SimpleImage:
                newInstance = new SimpleImage(null);
                break;

            case ObjectType.Movie:
                newInstance = new Movie(null);
                break;

            default:
                throw new IndexOutOfRangeException($"cannot handle object type: {objectTypeTag.Type}");
            }

            newInstance.Type = objectTypeTag.Type;

            return(newInstance);
        }
示例#5
0
    static int get_target(IntPtr L)
    {
        object     o   = LuaScriptMgr.GetLuaObject(L, 1);
        MultiImage obj = (MultiImage)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name target");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index target on a nil value");
            }
        }

        LuaScriptMgr.Push(L, obj.target);
        return(1);
    }
示例#6
0
    static int set_setNativeSize(IntPtr L)
    {
        object     o   = LuaScriptMgr.GetLuaObject(L, 1);
        MultiImage obj = (MultiImage)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name setNativeSize");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index setNativeSize on a nil value");
            }
        }

        obj.setNativeSize = LuaScriptMgr.GetBoolean(L, 3);
        return(0);
    }
示例#7
0
    static int set_target(IntPtr L)
    {
        object     o   = LuaScriptMgr.GetLuaObject(L, 1);
        MultiImage obj = (MultiImage)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name target");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index target on a nil value");
            }
        }

        obj.target = (UnityEngine.UI.Image)LuaScriptMgr.GetUnityObject(L, 3, typeof(UnityEngine.UI.Image));
        return(0);
    }
示例#8
0
    static int set_imageIndex(IntPtr L)
    {
        object     o   = LuaScriptMgr.GetLuaObject(L, 1);
        MultiImage obj = (MultiImage)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name imageIndex");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index imageIndex on a nil value");
            }
        }

        obj.imageIndex = (int)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }
        public override void Read(BinaryReader br, FrontendChunkBlock chunkBlock, Package package, ushort id,
                                  ushort length)
        {
            MultiImage multiImage = (MultiImage)FrontendObject;
            int        index      = (id >> 8) - 0x61;

            switch (index)
            {
            case 0:
                multiImage.TextureFlags1 = br.ReadUInt32();
                break;

            case 1:
                multiImage.TextureFlags2 = br.ReadUInt32();
                break;

            case 2:
                multiImage.TextureFlags3 = br.ReadUInt32();
                break;

            default:
                throw new IndexOutOfRangeException($"Invalid MultiImageTextureFlags index: {index}");
            }
        }
示例#10
0
 private void AddMultiImage(MultiImage mi)
 {
     images.Add(mi);
     OnPropertyChanges(nameof(images));
 }