Choumiko / ModuleInserter

5 stars 8 forks source link

Buttons and some config slots are unusable with MAX_CONFIG_SIZE = 20 #8

Closed clampi closed 5 years ago

clampi commented 5 years ago

Description Because I use mods which introduce multiple assembler machines for different purpose, I changed MAX_CONFIG_SIZE = 20 in control.lua. The value served me well in Factorio .16 and the associated versions of the mod. However, in the .17 versions of the mod, such change seemed to expose a bug/limitation in the code. Not all the config slots are usable (for the given size, only 17 are configurable) and none of the configuration buttons work. The profile buttons do work, so I can save the config to a named profile and restore.

Replication steps 1) Change the value of MAX_CONFIG_SIZE in control.lua to 20. 2) Launch game, enable the module inserter UI button through research. 3) Click UI button to bring up the config, which should be empty at this time. 4) Try to add configuration to the bottom config slots, observe odd behavior. While the UI shows graphics for said config slots, the cursor seems to thing it is outside config window and displays the world-entity beneath instead the expected tool-tip text "module-inserter-choose-assembler=Select an entity with module slots". See the screenshots for a visual comparison of working slots vs non-working. Also, none of the buttons work (SaveChanges, ClearAll, SaveAs), trying to click them clicks on world entities, possibly modifying them.

Expected behavior The configuration window should work for the changed size, as long as the graphics fit the game window.

Additional information Defect/limitation observed with mod version 4.0.3 UI scale is automatic at 100% in Settings->Interface. I run in windowed mode as I have multiple monitors and can play and work with ease this way. While the mouse cursor does not show in either of the screenshots, the working screenshot is taken with the cursor on the slot above the "pump" item and the non-working one is taken with the cursor on the slot below the "pump" item. Working_slot non_working_slot

Choumiko commented 5 years ago

I will update ModuleInserter in the next few days to use a scrollpane, that should "fix" the issues you are experiencing. Maybe i will remove the max config size while i'm at it and just add an empty button when all are set to a machine, so that it kind of auto extends (i will definitely move the config size to the mod settings)

It almost seems like a Factorio bug (especially clicking through displayed gui buttons), i'll make sure it's not something i messed up with some UI styles before reporting it though.

Thanks for the report

Choumiko commented 5 years ago

Should be "fixed" in the latest version (4.0.4). Now to find out if it was me or if it's a Factorio bug