You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -12,9 +12,7 @@ Terminator's Immediate-Mode Menu for Lmaobox
12
12
13
13
A GUI library for Lmaobox scripts, offering a convenient immediate-mode style API built on a retained-mode foundation. It's designed for light usage and rapid construction of in-game menus.
@@ -23,179 +21,107 @@ To install, download the latest release using the badge at the top of this page,
23
21
1. Unzip or extract the downloaded package.
24
22
2. Copy `TimMenu.lua` into your Lmaobox scripts folder (e.g., `%localappdata%\Scripts`).
25
23
26
-
## Usage
27
-
28
-
Building a menu with TimMenu is like writing a document: widgets are added from left to right, and `TimMenu.NextLine()` moves the cursor to the beginning of the next line, ready for more widgets.
29
-
30
-
```lua
31
-
localTimMenu=require("TimMenu")
32
-
33
-
localisChecked=false
34
-
localsliderValue=50
24
+
## Standalone API Guide
35
25
36
-
localfunctionOnDraw()
37
-
ifTimMenu.Begin("Example Window") then
38
-
TimMenu.Text("Hello, Lmaobox!")
26
+
TimMenu is now a **fully standalone** library. It does not require LNXlib or other external dependencies.
-**Immediate Mode**: You define the UI every frame. If you stop calling a widget function, it disappears.
31
+
-**Layout**: Widgets are placed left-to-right. Use `NextLine()` to move down.
32
+
-**Volume Claim**: The menu handles "Hit Testing" by treating the window and its popups as a single volume. If a dropdown sticks out, it still belongs to that window, preventing clicks from falling through to background elements.
- Use `BeginSector`/`EndSector` to group widgets in bordered panels.
161
-
- Sectors can be easily stacked horizontally and vertically
162
-
- All widgets return their current value - no need to track "changed" flags
163
-
- Values are automatically maintained between frames by the widget system
164
-
165
-
## Sector Grouping
166
-
167
-
Use `TimMenu.BeginSector(label)` and `TimMenu.EndSector()` to enclose widgets in a shaded, bordered panel. Nested sectors will automatically lighten the background more as depth increases.
- Removed confusing "changed" flags - just use the returned values directly
188
-
- Updated all example code to use the new simplified patterns
189
-
- Much cleaner and more intuitive widget usage
190
116
191
-
### Fixed Keybind Widget Lag
192
-
193
-
- Keybind widget now recalculates its display label immediately after a key press and dynamically computes its draw position inside the rendering callback, eliminating frame delay when dragging windows.
117
+
```
194
118
195
-
### Fixed TabControl Header Lag
119
+
##Tips
196
120
197
-
- Header-mode tabs now calculate their offsets relative to the window's current position at draw time, preventing one-frame lag during window movement.
121
+
- Sectors can be nested; backgrounds lighten automatically as depth increases.
122
+
- All widgets return their current value - no need to track "changed" flags manually.
123
+
- The volume hit-testing ensures that popups sticking out of windows correctly capture focus.
198
124
199
125
## License
200
126
201
-
MIT License. See [LICENSE](LICENSE) for details.
127
+
MIT License. See [LICENSE](https://www.google.com/search?q=LICENSE) for details.
0 commit comments