Пример #1
0
        public void Update()
        {
            if (Function.Call <int>(Hash._GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT, _mHash) > 0)
            {
                if (_shouldDraw)
                {
                    Script.Wait(10);
                    if (keypadButtonColor != Color.Empty)
                    {
                        SetSoftKeyColor(1, keypadButtonColor);
                    }
                    if (selectButtonColor != Color.Empty)
                    {
                        SetSoftKeyColor(2, selectButtonColor);
                    }
                    if (returnButtonColor != Color.Empty)
                    {
                        SetSoftKeyColor(3, returnButtonColor);
                    }

                    _shouldDraw = !_shouldDraw;
                }

                contacts.Update(Handle);
            }

            else
            {
                _shouldDraw = true;
            }
        }
Пример #2
0
        public void Update()
        {
            if (Function.Call <int>(Hash._GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT, _mScriptHash) > 0)
            {
                if (_shouldDraw)
                {
                    Script.Wait(0);

                    if (LeftButtonColor != Color.Empty)
                    {
                        SetSoftKeyColor(1, LeftButtonColor);
                    }
                    if (CenterButtonColor != Color.Empty)
                    {
                        SetSoftKeyColor(2, CenterButtonColor);
                    }
                    if (RightButtonColor != Color.Empty)
                    {
                        SetSoftKeyColor(3, RightButtonColor);
                    }

                    Script.Wait(0);

                    if (LeftButtonIcon != SoftKeyIcon.Blank)
                    {
                        SetSoftKeyIcon(1, LeftButtonIcon);
                    }
                    if (CenterButtonIcon != SoftKeyIcon.Blank)
                    {
                        SetSoftKeyIcon(2, CenterButtonIcon);
                    }
                    if (RightButtonIcon != SoftKeyIcon.Blank)
                    {
                        SetSoftKeyIcon(3, RightButtonIcon);
                    }

                    if (_wallpaper != null)
                    {
                        SetWallpaperTXD(_wallpaper.Name);
                    }

                    _shouldDraw = !_shouldDraw;
                }
            }

            else
            {
                _shouldDraw = true;
            }

            _contacts.Update(Handle);
        }