示例#1
0
        static void OnChangAccessFlag(MySyncTextPanel sync, ref ChangeAccessFlagMsg msg, MyNetworkClient sender)
        {
            sync.Entity.AccessFlag = (TextPanelAccessFlag)msg.AccessFlag;

            if (Sync.IsServer)
            {
                Sync.Layer.SendMessageToAll(ref msg);
            }
        }
示例#2
0
        static void OnChangeTitle(MySyncTextPanel sync, ref ChangeTitleMsg msg, MyNetworkClient sender)
        {
            m_helperSB.Clear().Append(msg.Title);
            if (msg.IsPublic)
            {
                sync.Entity.PublicTitle = m_helperSB;
            }
            else
            {
                sync.Entity.PrivateTitle = m_helperSB;
            }

            if (Sync.IsServer)
            {
                Sync.Layer.SendMessageToAll(ref msg);
            }
        }
示例#3
0
        static void OnChangeOpen(MySyncTextPanel sync, ref ChangeOpenMsg msg, MyNetworkClient sender)
        {
            if (Sync.IsServer && sync.Entity.IsOpen && msg.IsOpen)
            {
                return;
            }

            sync.Entity.IsOpen = msg.IsOpen;
            sync.Entity.UserId = msg.User;

            if (!MySandboxGame.IsDedicated && msg.User == Sync.MyId && msg.IsOpen)
            {
                sync.Entity.OpenWindow(msg.Editable, false, msg.IsPublic);
            }

            if (Sync.IsServer)
            {
                Sync.Layer.SendMessageToAll(ref msg);
            }
        }
        static void OnChangeOpen(MySyncTextPanel sync, ref ChangeOpenMsg msg, MyNetworkClient sender)
        {
            if (Sync.IsServer && sync.Entity.IsOpen && msg.IsOpen)
                return;

            sync.Entity.IsOpen = msg.IsOpen;
            sync.Entity.UserId = msg.User;

            if (!MySandboxGame.IsDedicated && msg.User == Sync.MyId && msg.IsOpen)
            {            
                sync.Entity.OpenWindow(msg.Editable, false,msg.IsPublic);
            }

            if (Sync.IsServer)
                Sync.Layer.SendMessageToAll(ref msg);
        }
        static void OnChangAccessFlag(MySyncTextPanel sync, ref ChangeAccessFlagMsg msg, MyNetworkClient sender)
        {
            sync.Entity.AccessFlag = (TextPanelAccessFlag)msg.AccessFlag;

            if (Sync.IsServer)
                Sync.Layer.SendMessageToAll(ref msg);
        }
        static void OnChangeTitle(MySyncTextPanel sync, ref ChangeTitleMsg msg, MyNetworkClient sender)
        {
            m_helperSB.Clear().Append(msg.Title);
            if (msg.IsPublic)
            {
                sync.Entity.PublicTitle = m_helperSB;
            }
            else
            {
                sync.Entity.PrivateTitle = m_helperSB;
            }

            if (Sync.IsServer)
                Sync.Layer.SendMessageToAll(ref msg);
        }