-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add font type setting to Settings menu
- Loading branch information
1 parent
3ef9fae
commit 89f7764
Showing
6 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/GridOS/BuiltInMenus/Settings/Commands/FontTypeCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace IngameScript | ||
{ | ||
class FontTypeCommand : ConfigurationCommand<string> | ||
{ | ||
protected override IReadOnlyList<NamedOption<string>> OptionsList => StaticConfig.FontTypes.AsList; | ||
protected override string LabelFormatString => "Font: {0}"; | ||
|
||
public FontTypeCommand(IMenuInstanceServices menuServices) : base(menuServices) | ||
{} | ||
|
||
protected override string GetInitialValue() | ||
=> _menuServices.DisplayConfig.BaseFontName; | ||
|
||
protected override void SetNewValue(string value) | ||
=> _menuServices.SetFontType(value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters