Hide GUI

Suggestions that have been added to the game.

Moderator: ickputzdirwech

Néomorphos
Inserter
Inserter
Posts: 44
Joined: Sun Oct 28, 2018 3:23 pm
Contact:

Hide GUI

Post by Néomorphos »

Hi all o/
just a quick idea : having a hotkey to hide/show the whole GUI. It would allow to simply walk through your base, enjoying its beauty/complexity/ingeniosity/whatever you want without the GUI. Many games have this option, and it also allows some content creators to produce "cinematic" content (but in Factorio, kinda hard tbh). Examples : overwatch, the witcher 3. (Ok, these are graphically big games, but still, Factorio has its own beauty) I haven't found a control for that in the settings.
Koub
Global Moderator
Global Moderator
Posts: 7955
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Hide GUI

Post by Koub »

[Koub] Moved to Ideas and suggestions.
I'm sure i've seen a similar suggestion recently, but couldn't find where.
Koub - Please consider English is not my native language.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Hide GUI

Post by eradicator »

Good news is that it's already trivial to mod. The problem with adding more and more vanilla hotkeys is just that it gets more and more difficult to chose a good default key :D.

Code: Select all

/c
local keys = {
  'show_controller_gui', 'show_minimap', 'show_research_info', 'show_entity_info',
  'show_alert_gui', 'update_entity_selection', 'show_rail_block_visualisation',
  'show_side_menu', 'show_map_view_options', 'show_quickbar','show_shortcut_bar',
  }
local x = not game.player.game_view_settings.show_controller_gui
for _,k in pairs(keys) do game.player.game_view_settings[k] = x end
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Néomorphos
Inserter
Inserter
Posts: 44
Joined: Sun Oct 28, 2018 3:23 pm
Contact:

Re: Hide GUI

Post by Néomorphos »

Very nice!! I don't know much about coding, how can I play with this code as a mod?
And, for hotkeys, I think some already aren't bind by default, so this could be added without bind.
eradicator wrote: Wed Aug 26, 2020 3:12 pm Good news is that it's already trivial to mod. The problem with adding more and more vanilla hotkeys is just that it gets more and more difficult to chose a good default key :D.

Code: Select all

/c
local keys = {
  'show_controller_gui', 'show_minimap', 'show_research_info', 'show_entity_info',
  'show_alert_gui', 'update_entity_selection', 'show_rail_block_visualisation',
  'show_side_menu', 'show_map_view_options', 'show_quickbar','show_shortcut_bar',
  }
local x = not game.player.game_view_settings.show_controller_gui
for _,k in pairs(keys) do game.player.game_view_settings[k] = x end
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Hide GUI

Post by eradicator »

You just need to define a custom-input ("hotkey") or a shortcut (those buttons right of the quickbar) in data stage and then listen for the corresponding event in control stage to call the function i posted.

Long time ago when hotkeys were new and shiny i made a tutorial mod to demonstrate how they work. I've been slacking off a bit on properly commenting all the changes each time i had to fix it up for a new factorio version but it should still be ok as a general guidline: https://mods.factorio.com/mod/HandCrankGenerator

If you want to make your own mod out of this you better make a new thread in modding-help.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 850
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: Hide GUI

Post by Hares »

Implemented in 2.0.
Fulgora is the best planet. Vulcanus needs rework. Feel free to prove me wrong.
Koub
Global Moderator
Global Moderator
Posts: 7955
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Hide GUI

Post by Koub »

[Koub] Moved to Implemented suggestions, thanks @Hares.
Koub - Please consider English is not my native language.
Néomorphos
Inserter
Inserter
Posts: 44
Joined: Sun Oct 28, 2018 3:23 pm
Contact:

Re: Hide GUI

Post by Néomorphos »

I don't find it, could you tell me where is it available ?
Hares wrote: Tue Dec 17, 2024 9:34 pm Implemented in 2.0.
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 850
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: Hide GUI

Post by Hares »

Néomorphos wrote: Thu Dec 19, 2024 11:07 am I don't find it, could you tell me where is it available ?
Open Settings -> Controls, field "Toggle GUI visibility". It looks that default hotkey is Ctrl+Shift+F4 (Ctrl+Shift+I is my override)
12-19-2024, 14-52-35.png
12-19-2024, 14-52-35.png (114.94 KiB) Viewed 2097 times
Fulgora is the best planet. Vulcanus needs rework. Feel free to prove me wrong.
Post Reply

Return to “Implemented Suggestions”