FairyGUI.GRoot.SetContentScaleFactor C# (CSharp) Method

SetContentScaleFactor() public method

Set content scale factor.
public SetContentScaleFactor ( int designResolutionX, int designResolutionY ) : void
designResolutionX int Design resolution of x axis.
designResolutionY int Design resolution of y axis.
return void
        public void SetContentScaleFactor(int designResolutionX, int designResolutionY)
        {
            SetContentScaleFactor(designResolutionX, designResolutionY, UIContentScaler.ScreenMatchMode.MatchWidthOrHeight);
        }

Same methods

GRoot::SetContentScaleFactor ( int designResolutionX, int designResolutionY, UIContentScaler screenMatchMode ) : void

Usage Example

Example #1
0
    static int SetContentScaleFactor(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(FairyGUI.GRoot), typeof(int), typeof(int)))
            {
                FairyGUI.GRoot obj  = (FairyGUI.GRoot)ToLua.ToObject(L, 1);
                int            arg0 = (int)LuaDLL.lua_tonumber(L, 2);
                int            arg1 = (int)LuaDLL.lua_tonumber(L, 3);
                obj.SetContentScaleFactor(arg0, arg1);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(FairyGUI.GRoot), typeof(int), typeof(int), typeof(FairyGUI.UIContentScaler.ScreenMatchMode)))
            {
                FairyGUI.GRoot obj  = (FairyGUI.GRoot)ToLua.ToObject(L, 1);
                int            arg0 = (int)LuaDLL.lua_tonumber(L, 2);
                int            arg1 = (int)LuaDLL.lua_tonumber(L, 3);
                FairyGUI.UIContentScaler.ScreenMatchMode arg2 = (FairyGUI.UIContentScaler.ScreenMatchMode)ToLua.ToObject(L, 4);
                obj.SetContentScaleFactor(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.GRoot.SetContentScaleFactor"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
All Usage Examples Of FairyGUI.GRoot::SetContentScaleFactor