示例#1
0
        //internal override void ScreenResolutionChanged()
        //{
        //	ModdersToolkitUserInterface.Recalculate();
        //}
        //internal override void UIUpdate()
        //{
        //	if (visible)
        //	{
        //		userInterface.Update(Main._drawInterfaceGameTime);
        //	}
        //}
        internal override void UIDraw()
        {
            if (visible)
            {
                moddersToolkitUI.Draw(Main.spriteBatch);
                if (EyedropperActive)
                {
                    Point   tileCoords   = Main.MouseWorld.ToTileCoordinates();
                    Vector2 worldCoords  = tileCoords.ToVector2() * 16;
                    Vector2 screenCoords = worldCoords - Main.screenPosition;

                    DrawBorderedRect(Main.spriteBatch, Color.LightBlue * 0.1f, Color.Blue * 0.3f, screenCoords, new Vector2(16, 16), 5);

                    if (!Main.LocalPlayer.mouseInterface && Main.mouseLeft)
                    {
                        EyedropperActive = false;

                        Tools.REPL.REPLTool.moddersToolkitUI.codeTextBox.Write($"Main.tile[{tileCoords.X},{tileCoords.Y}]");
                        // can't get this to work. Tools.REPL.REPLTool.moddersToolkitUI.codeTextBox.Focus();
                    }

                    Main.LocalPlayer.mouseInterface = true;
                }
            }
        }
示例#2
0
 public override void UIDraw()
 {
     if (Visible)
     {
         moddersToolkitUI.Draw(Main.spriteBatch);
     }
 }
示例#3
0
 internal override void UIDraw()
 {
     if (visible)
     {
         moddersToolkitUI.Draw(Main.spriteBatch);
     }
 }