Skip to content

Interlude.Tick

interludesoftware.tick

Interlude.Tick Namespace

Classes
ActionBindings Named, rebindable input actions — the configurable way for host-defined and scripted code (e.g. Lua's input:IsActionPressed) to read input, so it flows through the same binding configuration as every other tick input rather than polling raw keys. Unlike the fixed per-feature bindings (NavigationBindings, TextboxBindings, …) the action set is \<b>user-defined\</b>: the host keys actions in by name from C# (see LegacyActionBindings / InputSystemActionBindings), and callers query them by that name. Abstract — concrete backends bind native keys and read input directly, so there is no cross-system translation.
AnimationContext
AnimationContextEnter
AnimationContextEvent
AnimationContextEventBase
AnimationContextInit
AnimationContextLeave
AnimationContextProperty<T>
BaseGameUI
BatchCommand
Character
ColorExtensions UnityEngine.Color helpers used across the Tick UI public surface and the bundled samples.
CompositeResourceProvider Resource provider that walks an ordered list of inner providers on every TryGetFont(string, int, Font) / TryGetImage(string, Texture) / TryGetShader(string, Shader) lookup, returning the first hit. Index 0 has the highest priority; later entries act as progressively lower-priority fallbacks. Null entries in the list are silently skipped. Typical wiring: BaseGameUI builds a composite by adding the user-supplied providers (in inspector order) followed by the bundled DefaultTickConfig. Game code with a reference to the composite can Push(IGUIResourceProvider) additional providers at runtime (e.g. activating a localisation pack) and Remove(IGUIResourceProvider) them later.
ConsoleBindings Bindings for the debug Console widget. All actions are pressed-this-frame semantics.
Curves
DebuggerBindings Bindings for the built-in debugger overlay. Toggle() is pressed-this-frame; LockClickThroughHeld() reports whether the lock modifier is currently held; Interlude.Tick.DebuggerBindings.InspectElementHeld reports whether the inspect-element modifier is held — while held, the next left-click jumps to the source line that pushed the rect under the mouse, regardless of debugger visibility.
DrawCommand
Drawer
EarClipTriangulator Ear-clipping triangulator for simple 2D polygons. Input: List<Vector2> defining the polygon outline (CW or CCW). Output: Unity Mesh with triangles on the XY plane.
Font
FontAsset
GUIResourceProvider A serialized store of the images, sprites, fonts, and shaders a UI draws by name. Its sole runtime job is to hold that data and answer TryGet* lookups. The editor-time authoring workflow (populating the lists from a folder, copying textures, de-duplicating) lives in GUIResourceProviderEditor, not on the asset itself.
InputLegacy IInput implementation that reads from the legacy UnityEngine.Input API. Active when ENABLE_INPUT_SYSTEM is not defined.
InputSystemActionBindings Input System-backend action bindings. Each named action maps to one or more InputSystemKeyBindings (any one fires it). The implicit UnityEngine.InputSystem.Key conversion keeps the common case terse: `...`
InputSystemConsoleBindings Input System-backend console bindings. Each action is a list of InputSystemKeyBindings — any UnityEngine.InputSystem.Key plus optional modifier mask.
InputSystemDebuggerBindings Input System-backend debugger overlay bindings. Each action is a list of InputSystemKeyBindings — any UnityEngine.InputSystem.Key plus optional modifier mask.
InputSystemNavigationBindings Navigation bindings for the Input System backend. Each action binds a list of InputSystemControls (keyboard keys and/or gamepad buttons, including the D-pad), read directly from Keyboard.current / Gamepad.current — no setup and no key translation. The analog sticks have no UnityEngine.InputSystem.LowLevel.GamepadButton entry, so they are read directly from Gamepad.current.leftStick / rightStick when the matching Use* toggle is set. The left stick is on by default (the usual menu convention); the right stick is off because games usually bind it to the camera. Each stick produces a single edge per crossing of the threshold so holding does not auto-repeat.
InputSystemProvider IInput implementation that reads from the Unity Input System. Active when ENABLE_INPUT_SYSTEM is defined.
InputSystemTextboxBindings Input System-backend textbox bindings. Each action is a list of InputSystemKeyBindings — any UnityEngine.InputSystem.Key plus optional modifier mask.
LegacyActionBindings Legacy-backend action bindings. Each named action maps to one or more LegacyKeyBindings (any one fires it). The implicit UnityEngine.KeyCode conversion keeps the common case terse: `...`
LegacyConsoleBindings Legacy-backend console bindings. Each action is a list of LegacyKeyBindings — any UnityEngine.KeyCode plus optional modifier mask.
LegacyDebuggerBindings Legacy-backend debugger overlay bindings. Each action is a list of LegacyKeyBindings — any UnityEngine.KeyCode plus optional modifier mask.
LegacyNavigationBindings Navigation bindings for the legacy UnityEngine.Input backend. Each action binds a list of UnityEngine.KeyCodes — any key, including JoystickButton0–19 for controller buttons. Sticks and the D-pad have no UnityEngine.KeyCode, so they are read from project-defined Input Manager axes and mapped to the four directions when their respective Use* toggle is set. Add the axes under Project Settings > Input Manager; if they are absent the source is skipped after a single warning. The D-pad is on by default. Left- and right-stick are off by default because Unity's stock Horizontal / Vertical axes cover both WASD and the left stick, which would make character movement double as menu navigation. Opt in with axis names you own and don't share with gameplay (for example NavLeftStickH / NavLeftStickV).
LegacyTextboxBindings Legacy-backend textbox bindings. Each action is a list of LegacyKeyBindings — any UnityEngine.KeyCode plus optional modifier mask.
NavigationBindings Maps the navigation actions — directional moves, confirm and cancel — to physical inputs, and reports each frame whether they fired. This is abstract because the legacy UnityEngine.Input backend and the Input System share no key type; each has its own concrete subclass that binds and reads input natively, so there is no cross-system key translation: ... Assign through Interlude.Tick.InputBindings.Navigation or SetBindings(InputBindings); use Default for the backend-appropriate defaults.
Path Fluent path builder. Accumulates a closed polygonal outline with optional per-vertex corner rounding. Pass to FillPath(Path, Color) for rendering via the EarClip triangulator. Example: `...` Reuse a single instance across frames by calling Clear() between builds to avoid re-allocating the backing list.
RectangleBatcher
RectExtensionMethods
SegmentBatcher Instances thick-line draws (DrawCommand.DrawType.Segment) into one DrawMeshInstancedProcedural call per batch. Mirrors RectangleBatcher.
ShapeBatcher
TextboxBindings Bindings for the textbox widget. Abstract — concrete subclasses (LegacyTextboxBindings / InputSystemTextboxBindings) bind native keys and read input directly so there is no cross-system translation. All actions are pressed-this-frame semantics. Submit() triggers when the configured submit key fires (e.g. Return). Modifiers (Ctrl / Shift / Alt) are part of each binding so the standard shortcuts (Ctrl+C / Ctrl+V / …) can be rebound or moved to Cmd on macOS.
TickRecorder
TickRenderPass
TickRenderTextureInjector Drives an TickRecorder to render its output into a UnityEngine.RenderTexture each frame, instead of onto a camera target. Use this to display Tick UI on an in-world surface: assign a material that samples the RenderTexture to a quad or screen mesh in the scene, and the UI appears on it. Pipeline-agnostic. The injector does not hook into a camera; it executes its CommandBuffer directly each LateUpdate, after the recorder's DoUI has run.
Timer
UI Parameter-assertion helpers for the UI partial class. All entry points are stripped from non-editor builds via [Conditional("UNITY_EDITOR")] so the call sites compile to nothing in shipping builds — zero runtime cost.
Util
Structs
AutoLayout A disposable scope that automatically restores rect and clip stacks when disposed.
Configuration
CornerRadius
Gradient Describes a color gradient for use with Fill and FillRounded. Supports up to 4 color stops and three types: Linear (any angle), Radial (center outward), and Box (Chebyshev distance from center). Create via the static factory methods rather than the constructor.
GradientStop
GraphConfig Visual configuration for LineGraph(string, string, List<float>, Vector2, Vector2, GraphConfig): title font and size, title / axis / line colours, and axis visibility. Use Default and override the fields you care about.
Id
InputBindings Container for the per-feature binding configs the UI library reads from. One field per input-consuming feature; widgets resolve actions via ui.Bindings.Xxx.Action(). Set at setup via Bindings or replaced at runtime via SetBindings(InputBindings). Adding a future binding category is a five-line edit: add the abstract base + two backend subclasses, drop a field on this struct, and seed it in Interlude.Tick.InputBindings.Default.
InputSystemControl A single Input System control a navigation action can bind to: either a keyboard UnityEngine.InputSystem.Key or a UnityEngine.InputSystem.LowLevel.GamepadButton (which includes the D-pad). Implicit conversions let bindings read naturally, e.g. { Key.UpArrow, GamepadButton.DpadUp }.
InputSystemKeyBinding A single key + modifier descriptor for the Input System backend. Used by every InputSystem*Bindings class; the implicit conversion from Interlude.Tick.InputSystemKeyBinding.Key keeps no-modifier bindings terse (Up = { Key.UpArrow }).
LegacyKeyBinding A single key + modifier descriptor for the legacy UnityEngine.Input backend. Used by every Legacy*Bindings class; the implicit conversion from UnityEngine.KeyCode keeps no-modifier bindings terse (Up = { KeyCode.UpArrow }).
Margin
OnScreenKeyboardConfig Options passed to OpenOnScreenKeyboard(string, OnScreenKeyboardConfig). All flags default to false, which produces a plain editable text field.
OnScreenKeyboardState Snapshot of the platform on-screen keyboard's current state, returned by GetOnScreenKeyboardState(). IsActive stays true from the frame the keyboard opens until it dismisses. DidSubmit and DidCancel are one-shot — they report the keyboard's terminal state on the frame it transitions, then go back to false on subsequent frames (the provider's idempotent read protects against double-firing).
Pointer A single active pointing device at a single point in time. Returned by GetPointer(int); the per-frame set is enumerated via GetPointerCount(). The provider always reports the mouse at index 0, with IsPrimarytrue — so on a desktop, mouse-only games look identical to the pre-pointer code. Additional active touches follow at indices 1..N; each carries its own Id (the touch's fingerId) so consumers that care about multi-touch can track a single finger across frames. The mouse pointer is always present (so a mouse-only game sees GetPointerCount() == 1 every frame, with IsDown reflecting whether the left button is held). Touch pointers only appear while their finger is on the screen.
ScrollConfig
Size A length used by layout helpers (Top(Size), PushSizedHorizontal(Size[]), etc.). Either an absolute pixel count (Interlude.Tick.SizeUnit.Pixel) or a fraction of the parent dimension in [0, 1] (Interlude.Tick.SizeUnit.Percent). The implicit int → Pixel and float → Percent conversions are convenient at literal call sites but can silently mis-interpret computed values: Left(10f) is 1000% of parent, not 10 pixels. Prefer Pixels(int) / Percent(float) when the unit is not obvious from context - particularly when the value comes from arithmetic, a serialised field, or a Mathf call.
TextboxConfig
Interfaces
IClock Abstraction over Unity's UnityEngine.Time so animation timing can be driven by a fake clock in tests.
IDpiSource Reads UnityEngine.Screen.dpi. Tests can replace this with a stub so GetReferenceResolution() behaviour is reproducible without depending on the runtime display.
IDrawer The drawing back-end that UI queues primitives into during DoUI, then flushes through RecordInto(CommandBuffer) when the render-pipeline integration is ready to issue draw calls. The package ships a single concrete implementation (Drawer) and the typical user never needs to interact with this interface directly; it is exposed so custom integrations and tests can substitute their own implementation. The shipped integrations (TickURPInjector, TickBIRPInjector, TickRenderTextureInjector) all forward through TickRecorder to the UI's drawer. Coordinates: every Draw* method except DrawLinePixel(Vector2, Vector2, Color, Color) and DrawLinesPixel(ReadOnlySpan<Vector2>, Color) takes screen-space pixels (the result of UI.LayoutToScreen). The two pixel-named methods are also pixel-space; they exist for primitives that bypass the layout system (e.g. debugger overlays).
IGUIResourceProvider
IInput Raw input surface that providers expose to the UI. Per-feature actions (navigation, textbox shortcuts, console toggles, debugger keys) are \<b>not\</b> on this interface — they live on the polymorphic bindings under Bindings, which each widget reads directly. This interface stays focused on uninterpreted input.
Enums
Axis A single layout axis. Used by Size-resolving helpers on UI (e.g. ToPixels(Size, Axis)) to pick which dimension of the current rect to resolve against.
ImageScaleMode How an image fits inside its destination rect when its aspect ratio differs from the rect's. See the Image overloads on UI that accept this enum.
ModifierMask Modifier keys that a binding requires held when its key is pressed. Used by every per-feature bindings class to express shortcuts like Ctrl+C / Shift+Tab. The match semantics are \<b>exact\</b>: only the modifiers in the mask may be held when the key is pressed, so Shift+Tab does not trigger a Tab-with-no-modifiers binding.
ScaleMode How layout-space coordinates map to screen pixels.