void SelectCursor() { if (mouse.IsMiddleClick() || mouse.IsBWDClick() || Input.GetKey(Key.C).Held) { if (mouse.Y < Parent.Screen.Height && mouse.Y >= 0 && mouse.X < Parent.Screen.Width && mouse.X >= 0) { var data = ConsoleRendererExtensions.getCharAt((ConsoleRenderer)Parent.Screen, mouse.X, mouse.Y); if (data.Item1 == '█') { colorValue.Value = data.Item2 & 0x0F; } else { colorValue.Value = data.Item2; } } } if (mouse.IsFWDClick() || Input.GetKey(Key.X).Held) { if (mouse.Y < Parent.Screen.Height && mouse.Y >= 0 && mouse.X < Parent.Screen.Width && mouse.X >= 0) { var data = ConsoleRendererExtensions.getCharAt((ConsoleRenderer)Parent.Screen, mouse.X, mouse.Y); characterValue = data.Item1; } } }
void DrawBorder() { if (scale == 1f) { Parent.Screen.DrawRectangle('!', spriteX - 1, spriteY - 1, activeSprite.Width + 1, activeSprite.Height + 1, 12); ConsoleRendererExtensions.DrawConsoleSprite((ConsoleRenderer)Parent.Screen, activeSprite, spriteX, spriteY); } else { Parent.Screen.DrawRectangle('!', spriteX - 1, spriteY - 1, (int)(activeSprite.Width * scale * scale), (int)(activeSprite.Height * scale * scale), 12); ConsoleRendererExtensions.DrawConsoleSprite((ConsoleRenderer)Parent.Screen, activeSprite, spriteX, spriteY, scale, scale); } }
void DrawCursor() { var height = Parent.Screen.Height; var width = Parent.Screen.Width; var screen = Parent.Screen; short col = 12; var data = ConsoleRendererExtensions.getCharAt((ConsoleRenderer)screen, mouse.X, mouse.Y); if (data != null) { col = (short)(data.Item2 * 2 + 5); } screen.Draw('▒', mouse.X, mouse.Y, col); }