General confirm event?

Place to get help with not working mods / modding interface.
Post Reply
hoylemd
Inserter
Inserter
Posts: 27
Joined: Tue Apr 17, 2018 2:14 am
Contact:

General confirm event?

Post by hoylemd »

in FFF#362 https://factorio.com/blog/post/fff-362 it's mentioned that the `E` hotkey has been redefined to mean 'confirm' instead of `cancel` which is bound by default to `Esc`. I'm working on a mod where there's a pop-up gui, and I'd like it to respect this convention. I've got it handling `on_gui_closed` properly, but it seems that the `E` hotkey triggers that event, not `on_gui_confirmed` (which appears only to be fired by pressing enter in a text box?). Am I missing something in the docs about properly registering for a confirm event, or is this priviledged functionality to the core game?

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: General confirm event?

Post by eradicator »

I'd go with a custom input with linked_game_control = 'confirm-gui'.
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.

Post Reply

Return to “Modding help”