Skip to content

Instantly share code, notes, and snippets.

View jefferyharrell's full-sized avatar

Jeffery Harrell jefferyharrell

View GitHub Profile
if (table.def.defName != "Work")
{
return true;
}
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)
@jefferyharrell
jefferyharrell / LabelDrawer.cs
Created September 5, 2023 00:55
DrawInclinedLabel
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.