Пример #1
0
        private void DrawWeaponDropArrow(GraphicsContext graphicsContext, CDrop drop, Vector2 screenPosition, float scale)
        {
            const float Size = 30;
            const string FontName = "Minecraftia.16";
            CWeaponDrop weaponDrop = drop.Entity.Get<CWeaponDrop>();

            graphicsContext.PrimitiveRenderer.DrawRectangle(screenPosition, Size * scale, Color.White * SkypieaViewConstants.DropArrowAlpha);
            graphicsContext.PrimitiveRenderer.DrawRectangleOutlines(RectangleF.CreateCentered(screenPosition, Size * scale), Color.Black * SkypieaViewConstants.DropArrowAlpha, 4 * scale);
            graphicsContext.SpriteBatch.DrawStringFadedCentered(graphicsContext.FontContainer[FontName], weaponDrop.Type.ToChar(), screenPosition, Color.White * SkypieaViewConstants.DropArrowAlpha, Color.Black * SkypieaViewConstants.DropArrowAlpha, 0, scale);
        }
Пример #2
0
 private void DrawLifeDropArrow(GraphicsContext graphicsContext, CDrop drop, Vector2 screenPosition, float scale)
 {
     const float BaseScale = 6;
     graphicsContext.SpriteBatch.DrawCentered(SkypieaViewConstants.LoadTexture(_contentProvider, "Life"), screenPosition, Color.White * SkypieaViewConstants.DropArrowAlpha, 0, BaseScale * scale);
 }