protected virtual void ApplyFont(KaraokeFont font) { // From text sample karaokeText.FrontTextTexture = new SolidTexture { SolidColor = Color4.Blue }; // font.FrontTextBrushInfo.TextBrush.ConvertToTextureSample(); karaokeText.FrontBorderTexture = font.FrontTextBrushInfo.BorderBrush.ConvertToTextureSample(); karaokeText.FrontTextShadowTexture = font.FrontTextBrushInfo.ShadowBrush.ConvertToTextureSample(); // Back text sample karaokeText.BackTextTexture = font.BackTextBrushInfo.TextBrush.ConvertToTextureSample(); karaokeText.BackBorderTexture = font.BackTextBrushInfo.BorderBrush.ConvertToTextureSample(); karaokeText.BackTextShadowTexture = font.BackTextBrushInfo.ShadowBrush.ConvertToTextureSample(); // Apply text font info var lyricFont = font.LyricTextFontInfo.LyricTextFontInfo; karaokeText.Font = new FontUsage(size: lyricFont.CharSize); // TODO : FontName and Bold karaokeText.Border = lyricFont.EdgeSize > 0; karaokeText.BorderRadius = lyricFont.EdgeSize; var rubyFont = font.RubyTextFontInfo.LyricTextFontInfo; karaokeText.RubyFont = new FontUsage(size: rubyFont.CharSize); // TODO : FontName and Bold var romajiFont = font.RomajiTextFontInfo.LyricTextFontInfo; karaokeText.RomajiFont = new FontUsage(size: romajiFont.CharSize); // TODO : FontName and Bold // Apply shadow karaokeText.Shadow = font.UseShadow; karaokeText.ShadowOffset = font.ShadowOffset; }
protected override void ApplyFont(KaraokeFont font) { base.ApplyFont(font); if (defaultValueAssigned) { return; } defaultValueAssigned = true; // Assign default value here testScene.colorAreaDropdown.Current.TriggerChange(); testScene.fontAreaDropdown.Current.TriggerChange(); testScene.displayShaderCheckbox.Current.Value = Font.UseShadow; }
protected override void ApplySkin(ISkinSource skin, bool allowFallback) { // Get layout Font = skin?.GetConfig <KaraokeSkinLookup, KaraokeFont>(new KaraokeSkinLookup(KaraokeSkinConfiguration.LyricStyle, HitObject.FontIndex))?.Value; base.ApplySkin(skin, allowFallback); }