Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
clampi opened this issue Mar 10, 2019 · 2 comments
Closed
Labels

Comments

@clampi
Copy link

clampi commented Mar 10, 2019

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
Copy link
Owner

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 Choumiko added the bug label Mar 10, 2019
@Choumiko
Copy link
Owner

Choumiko commented Mar 12, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants