예제 #1
0
        public static void DrawText(string text, int x, int y)
        {
            SolidColorBrush dBrushBack = new SolidColorBrush(Device, Color.FromArgb(1, 1, 1).toRawColor4());
            SolidColorBrush dBrush     = new SolidColorBrush(Device, Settings.userSettings.VisualColors.World_Text.toRawColor4());

            if (text == "Darc Euphoria")
            {
                if (_RED_TO_GREEN > 510)
                {
                    dBrush.Color = Color.FromArgb(_RED_TO_GREEN - 510, 255 - (_RED_TO_GREEN - 510), 0).toRawColor4();
                }
                else if (_RED_TO_GREEN > 255)
                {
                    dBrush.Color = Color.FromArgb(0, _RED_TO_GREEN - 255, 255 - (_RED_TO_GREEN - 255)).toRawColor4();
                }
                else
                {
                    dBrush.Color = Color.FromArgb(255 - _RED_TO_GREEN, 0, _RED_TO_GREEN).toRawColor4();
                }
            }
            else
            {
                Device.DrawText(text, gvar.textFormat, MathFuncs.StringSize(text, x - 1, y), dBrushBack);
                Device.DrawText(text, gvar.textFormat, MathFuncs.StringSize(text, x + 1, y), dBrushBack);
                Device.DrawText(text, gvar.textFormat, MathFuncs.StringSize(text, x, y - 1), dBrushBack);
                Device.DrawText(text, gvar.textFormat, MathFuncs.StringSize(text, x, y + 1), dBrushBack);
            }

            Device.DrawText(text, gvar.textFormat, MathFuncs.StringSize(text, x, y), dBrush);
            dBrushBack.Dispose();
            dBrush.Dispose();
        }