Font fallbacks.
This commit is contained in:
@@ -54,6 +54,8 @@ public class TestGame : Game
|
||||
{
|
||||
throw new Exception("Failed to load emitter settings!");
|
||||
}
|
||||
|
||||
_defaultFontSet = new([_font, _jpFont]);
|
||||
}
|
||||
|
||||
protected override void Ready()
|
||||
@@ -78,7 +80,7 @@ public class TestGame : Game
|
||||
|
||||
if (Input.IsActionPressed("accept"))
|
||||
{
|
||||
_container.AddChild(new Label("こんにちは世界!", _jpFont));
|
||||
_container.AddChild(new Label("こんにちは世界!", _defaultFontSet));
|
||||
}
|
||||
|
||||
if (Input.IsActionPressed("cancel") && _container.Children.Count != 0)
|
||||
@@ -126,6 +128,9 @@ public class TestGame : Game
|
||||
private ResourceRef<ParticleEmitterSettingsResource> _fireEffect;
|
||||
private ResourceRef<Font> _font;
|
||||
private ResourceRef<Font> _jpFont;
|
||||
|
||||
private FontSet _defaultFontSet;
|
||||
|
||||
private ResourceRef<Sound> _sound;
|
||||
private ResourceRef<Texture2d> _icon;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user