public RadialButton(Game game, GameObject owner, CommandButton commandButton, bool isHeroButton = false) { _game = game; _owner = owner; CommandButton = commandButton; _objectDefinition = commandButton.Object?.Value ?? null; IsRecruitHeroButton = isHeroButton; _background = commandButton.ButtonImage.Value; _border = _game.GetMappedImage("RadialBorder"); _hover = _game.GetMappedImage("RadialOver"); _down = _game.GetMappedImage("RadialPush"); _width = _border.Coords.Width; _fontColor = new ColorRgbaF(0, 0, 0, 1); // _game.AssetStore.InGameUI.Current.DrawableCaptionColor.ToColorRgbaF(); -> this is white -> conflicts with the progress clock _fontSize = _game.AssetStore.InGameUI.Current.DrawableCaptionPointSize; var fontWeight = _game.AssetStore.InGameUI.Current.DrawableCaptionBold ? FontWeight.Bold : FontWeight.Normal; _font = _game.ContentManager.FontManager.GetOrCreateFont(_game.AssetStore.InGameUI.Current.DrawableCaptionFont, _fontSize, fontWeight); _alphaMask = MappedImageUtility.CreateTexture(_game.GraphicsLoadContext, _game.GetMappedImage("RadialClockOverlay1")); //_scheme = game.AssetStore.ControlBarSchemes.FindBySide(game.Scene3D.LocalPlayer.Side); }
public MappedImageView(DiagnosticViewContext context, MappedImage mappedImageAsset) : base(context) { _texture = MappedImageUtility.CreateTexture(context.Game.GraphicsLoadContext, mappedImageAsset); var textureViewDescription = new TextureViewDescription(_texture, 0, 1, 0, 1); _textureView = AddDisposable(Context.Game.GraphicsDevice.ResourceFactory.CreateTextureView(ref textureViewDescription)); }