Jump to content

Resize a part's right click UI?


Recommended Posts

It should be, though it probably get pretty messy/hacky. Those right click menu stuff is handled by UIPartAction... classes. There is a UIPartActionController that holds a bunch of prefabs you probably can mess around with to resize all right click menus. The derived types of UIPartActionItem seem to expose their UI elements as well, UIPartActionToggle for example has SpriteText fieldName, SpriteText fieldStatus & UIStateToggleBtn toggle. It definitively doesn't look easy and might be even worth to make this a separate mod. Though changing a specific instance of the right click menu seems not worth the effort imo, so far...

Link to comment
Share on other sites

Yeah, that doesn't sound worth the effort for what I'm doing but it is good to know as a just-in-case thing, thanks. I'll just rethink how I'm using the context menu instead.

But say I were to extend from UIPartActionController (I assume this handles the menu itself?) for a custom menu, how would I set a part to use my class? I didn't see any properies in Part or PartModule that looked relevant, would I have to catch the right click and handle the menu instance myself then? That definitely would get hacky, and sort of reinventing the wheel just to change the tire.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...