StrangeLoopGames / EcoModKit

Eco Modkit
https://docs.play.eco
69 stars 25 forks source link

Optional Monospaced Font #20

Open nidaren opened 3 years ago

nidaren commented 3 years ago

Optional Monospaced Font

I was wondering if considering the improvement of the easiness of formatting, would it be possible to add optional, additional monospaced font that could be selected to be displayed in info windows, or anywhere where the information is presented to the player. By default the current font of the game would be used, of course

It would make simple tables and rowing easy in formatting. Game would apply default font normally, unless specified otherwise by the modder as per window etc.

As an example, additional argument could be added to the OpenCustomPanel:

Would become:

public void OpenCustomPanel(string title, string text, string instance, Eco.Fonts.Font font = Eco.Fonts.Font.default)
{
    BSONObject @new = BSONObject.New;
    @new["title"] = title;
    @new["text"] = text;
    @new["instance"] = instance;
    @new["font"] = font;
    this.Client.RPC("OpenUI", this.Client, new object[]
    {
    "InfoPanel",
    @new
    });
}          

options for font would be: default and monospace.