Esempio n. 1
0
        private void SetTexture()
        {
            //
            //  load the text for the selected Bubble type
            //
            _bThoughtLoaded = _IsThought.Value;

            lock (oBackground)
            {
                if (_IsThought.Value)
                {
                    sbBackground = new StardewBitmap(Path.Combine(ModPath, "think_bubble.png"));
                }
                else
                {
                    sbBackground = new StardewBitmap(Path.Combine(ModPath, "talk_bubble.png"));
                }

                sbBackground.ResizeImage(300, 200);
                if (Game1.IsMultiplayer)
                {
                    //
                    //  store image data to send to other players
                    //
                    _BubbleImageData = sbBackground.TextureNetArray();
                }
            }
        }
Esempio n. 2
0
        public BubbleGuy(bool bIsThought, string sText, Texture2D background) : this()
        {
            SDV_Logger.DumpObject("background", background);
            //ModPath.Set(sModDir);
            _IsThought.Value = bIsThought;
            _IsThought.MarkDirty();
            _PlayerId.Value = Game1.player.UniqueMultiplayerID;
            _PlayerId.MarkDirty();
            sbBackground = new StardewBitmap(background);
            sbBackground.ResizeImage(300, 200);
            sbBackground.FillArray(ref _BubbleImageData);
#if LOG_DEBUG
            monitor.Log($"_BubbleImageData length: {_BubbleImageData.Count}", LogLevel.Info);
#endif
            _BubbleImageData.MarkDirty();
            Text            = sText;
            _bThoughtLoaded = _IsThought.Value;
        }
Esempio n. 3
0
        private void SetTexture()
        {
            _bThoughtLoaded = _IsThought.Value;

            lock (oBackground)
            {
                if (_IsThought.Value)
                {
                    sbBackground = new StardewBitmap(Path.Combine(ModPath, "think_bubble.png"));
                }
                else
                {
                    sbBackground = new StardewBitmap(Path.Combine(ModPath, "talk_bubble.png"));
                }
                sbBackground.ResizeImage(300, 200);
                _BubbleImageData = sbBackground.TextureNetArray();

                //sbBackground.Save("bubbleguy.png");
            }
        }