Is there a way to hide some of the side panel buttons?

Place to get help with not working mods / modding interface.
Post Reply
Doctor_Willis
Burner Inserter
Burner Inserter
Posts: 16
Joined: Tue Sep 26, 2023 11:45 am
Contact:

Is there a way to hide some of the side panel buttons?

Post by Doctor_Willis »

I'd like to hide most of the buttons in the side panel, only showing the Research button and the Tips and tricks button, like this:
Side panel.png
Side panel.png (3.89 KiB) Viewed 153 times

Or maybe even with some text next to the icon, like this:
Side panel with words.png
Side panel with words.png (5.3 KiB) Viewed 153 times

Is this something I can do with some code? Or would I have to develop a new GUI?
And related to this, can I disable the hotkeys that open some of these? (B, P, and O)

Bilka
Factorio Staff
Factorio Staff
Posts: 3159
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Is there a way to hide some of the side panel buttons?

Post by Bilka »

You can hide the entire bar with player.game_view_settings.show_side_menu = false, but you can't control individual buttons. Note also that when using a controller, the buttons are accessible via the quick panel.

You cannot disable the hotkeys. What you can do is use the permissions system to disallow opening the guis. The permission system is accessible for mods via player.permission_group -> LuaPermissionGroup.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Modding help”