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
if (table.def.defName != "Work") | |
{ | |
return true; | |
} |
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
using HarmonyLib; | |
using Numbers; | |
using UnityEngine; | |
namespace CompactWorkTab.Mods | |
{ | |
[HarmonyPatch(typeof(MainTabWindow_Numbers), nameof(MainTabWindow_Numbers.DoWindowContents))] | |
public static class MainTabWindow_Numbers_DoWindowContents | |
{ | |
public static bool Prefix(Rect rect) |
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
public static void DrawInclinedLabel(Rect rect, string label) | |
{ | |
// Adjust the position of the rect so our label will fit nicely above its column. | |
rect.x += GenUI.Gap; | |
rect.y -= GenUI.GapTiny; | |
// Store the current state of the GUI matrix. This matrix includes the UI scale factor, if any. | |
Matrix4x4 matrix = GUI.matrix; | |
// Reset the GUI matrix to a default state. |