[GH-ISSUE #4288] Native mods: buttons, tooltips and item icons on mod screens #1259

Closed
opened 2026-11-02 15:45:30 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @Sylviromi on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4288

🤖 Filed by Sylviromi's AI agent (Claude Code, Claude Opus 5.5), not by Sylviromi personally.

Part of #3911 (Mods), after #4106 (mod-drawn screens). From #1854's gaps: "M, menus and screens" and "U, client UI".

Today

A mod screen (#4106) can only draw. Machine mods' windows have buttons (a power switch, auto-output, settings tabs), tooltips over them, item icons in titles and tabs, and windows that aren't vanilla's 176 wide with their own title and labels.

Proposal

  • native_screen_click(block, data, at, right, &mut Option<i32>): a press on a mod screen (inside or beside the window) becomes a menu button id, sent as vanilla's ContainerButtonClick; native_menu_button(pos, &mut ModBlockEntity, id) runs it on the server (clickMenuButton).
  • native_screen_tooltip(block, data, at, &mut Vec<String>): lines under the mouse, in vanilla's tooltip box.
  • NativeScreen gets width, the inventory's left column and own_labels (the mod draws the title and "Inventory" itself).
  • Helpers: native_item (an item's icon at any size), native_cursor, native_screen_title, native_block_property, native_insert_item (into a neighbouring container, as a hopper: a machine's auto-output).
Originally created by @Sylviromi on GitHub (Oct 30, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4288 > 🤖 Filed by Sylviromi's AI agent (Claude Code, Claude Opus 5.5), not by Sylviromi personally. Part of #3911 (Mods), after #4106 (mod-drawn screens). From #1854's gaps: "M, menus and screens" and "U, client UI". ## Today A mod screen (#4106) can only draw. Machine mods' windows have buttons (a power switch, auto-output, settings tabs), tooltips over them, item icons in titles and tabs, and windows that aren't vanilla's 176 wide with their own title and labels. ## Proposal - `native_screen_click(block, data, at, right, &mut Option<i32>)`: a press on a mod screen (inside or beside the window) becomes a menu button id, sent as vanilla's `ContainerButtonClick`; `native_menu_button(pos, &mut ModBlockEntity, id)` runs it on the server (`clickMenuButton`). - `native_screen_tooltip(block, data, at, &mut Vec<String>)`: lines under the mouse, in vanilla's tooltip box. - `NativeScreen` gets `width`, the inventory's left column and `own_labels` (the mod draws the title and "Inventory" itself). - Helpers: `native_item` (an item's icon at any size), `native_cursor`, `native_screen_title`, `native_block_property`, `native_insert_item` (into a neighbouring container, as a hopper: a machine's auto-output).
Author
Owner

@Sylviromi commented on GitHub (Oct 30, 2026):

/claim

<!-- gh-comment-id:6518622498 --> @Sylviromi commented on GitHub (Oct 30, 2026): /claim
Author
Owner

@github-actions[bot] commented on GitHub (Oct 30, 2026):

🤖 Claims: refused, You hold 5 open issues: finish or /unclaim one first. (asked by @Sylviromi)

<!-- gh-comment-id:6518624867 --> @github-actions[bot] commented on GitHub (Oct 30, 2026): 🤖 Claims: refused, You hold 5 open issues: finish or `/unclaim` one first. (asked by @Sylviromi)
Author
Owner

@Sylviromi commented on GitHub (Oct 30, 2026):

🤖 Comment by Sylviromi's AI agent (Claude Code, Claude Opus 5.5), not by Sylviromi personally.

The claim was refused (5 open issues held, all with PRs in the same stack: #3996 → #4055 → #4072 → #4097 → #4106). The work is already up as draft #4289, stacked on them; I'll /claim this as soon as #3996 merges and frees a slot.

<!-- gh-comment-id:6518715287 --> @Sylviromi commented on GitHub (Oct 30, 2026): > 🤖 Comment by Sylviromi's AI agent (Claude Code, Claude Opus 5.5), not by Sylviromi personally. The claim was refused (5 open issues held, all with PRs in the same stack: #3996 → #4055 → #4072 → #4097 → #4106). The work is already up as draft #4289, stacked on them; I'll `/claim` this as soon as #3996 merges and frees a slot.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1259
No description provided.