mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-19 04:26:52 -04:00
Quick fix for FPS screen not having its font changed.
This commit is contained in:
parent
70243e6838
commit
d7972f43f3
@ -67,14 +67,17 @@ namespace ClassicalSharp {
|
||||
|
||||
Make( 140, 0, "Arial chat font", OnWidgetClick,
|
||||
g => g.Drawer2D.UseBitmappedChat ? "no" : "yes",
|
||||
HandleArialChatFont ),
|
||||
(g, v) => { g.ChatLines = Int32.Parse( v );
|
||||
g.Drawer2D.UseBitmappedChat = v == "no";
|
||||
Options.Set( OptionsKey.ArialChatFont, v == "yes" );
|
||||
HandleFontChange();
|
||||
} ),
|
||||
|
||||
Make( 140, 50, "Chat font name", OnWidgetClick,
|
||||
g => g.FontName,
|
||||
(g, v) => { g.FontName = v;
|
||||
Options.Set( OptionsKey.FontName, v );
|
||||
g.RefreshHud();
|
||||
Recreate();
|
||||
HandleFontChange();
|
||||
} ),
|
||||
|
||||
MakeBack( false, titleFont,
|
||||
@ -86,9 +89,7 @@ namespace ClassicalSharp {
|
||||
okayIndex = widgets.Length - 1;
|
||||
}
|
||||
|
||||
void HandleArialChatFont( Game g, string v ) {
|
||||
g.Drawer2D.UseBitmappedChat = v == "no";
|
||||
Options.Set( OptionsKey.ArialChatFont, v == "yes" );
|
||||
void HandleFontChange() {
|
||||
game.Events.RaiseChatFontChanged();
|
||||
|
||||
if( inputWidget != null ) {
|
||||
@ -97,8 +98,7 @@ namespace ClassicalSharp {
|
||||
if( descWidget != null ) {
|
||||
descWidget.Dispose(); descWidget = null;
|
||||
}
|
||||
|
||||
g.RefreshHud();
|
||||
game.RefreshHud();
|
||||
Recreate();
|
||||
}
|
||||
|
||||
|
@ -230,6 +230,7 @@ namespace ClassicalSharp {
|
||||
string text = inputWidget.GetText();
|
||||
if( inputWidget.Validator.IsValidValue( text ) )
|
||||
targetWidget.SetValue( game, text );
|
||||
if( inputWidget != null )
|
||||
inputWidget.Dispose();
|
||||
inputWidget = null;
|
||||
UpdateDescription( targetWidget );
|
||||
|
@ -85,6 +85,7 @@ namespace Launcher2 {
|
||||
} catch( Exception ) {
|
||||
FontName = "Arial";
|
||||
Options.Set( "gui-fontname", "Arial" );
|
||||
FontFamily.Families;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user