Mindustry icon indicating copy to clipboard operation
Mindustry copied to clipboard

New categories and placement

Open nekit508 opened this issue 1 year ago • 9 comments

Added search lines for categories and blocks and the ability to create new categories of blocks (does not conflict with existing mods).

  • [x] I have read the contribution guidelines.
  • [x] I have ensured that my code compiles, if applicable.
  • [x] I have ensured that any new features in this PR function correctly in-game, if applicable. java_0uLDgXVAlX

nekit508 avatar Apr 19 '23 13:04 nekit508

There are a lot of problems here:

  • Takes up a lot more UI space, which is very important on mobile. In fact, this probably completely breaks portrait mode.
  • Looks rather ugly compared to the old compact layout. There's a whole lot of empty space and a search box nobody will ever need to use in vanilla (or even in most mods...)
  • Destroys existing muscle memory by rearranging button order.
  • Breaks any mods that use the category array - it's an API change.
  • Doesn't really solve the category problem neatly - some future mods will use new categories, but others will not. Users will be left with 90% of mods having their stuff injected into existing categories, and the rest having their own, which is messy and suboptimal. Mods can't easily share categories, either.

Anuken avatar Apr 19 '23 14:04 Anuken

Still, does the idea have a future? Does it make sense to fix the listed problems?

nekit508 avatar Apr 19 '23 15:04 nekit508

The number of columns in the category panel can be reduced, and the search bar can be made optional. The order of the buttons for vanilla categories does not change in any way

nekit508 avatar Apr 19 '23 15:04 nekit508

Keep it 2 columns wide and 4 rows tall and just have extra categories require scrolling down, and a search bar for categories is probably not needed.

Also, neuron activation.

MEEPofFaith avatar Apr 19 '23 17:04 MEEPofFaith

To reduce spam in modified categories, I suggest the following options:

  • Add ability to scroll to save available screen space.
  • Make it so that no more than 10 categories are displayed at the same time and add special buttons "<", "[category section number]" and ">" to quickly switch between category sections.
  • Add the ability to customize categories. For example, you can add the option of "selective display" of categories, where the user can choose which categories he wants to see on the main page, and which - to hide in the menu. However, this may cause some modified blocks to disappear, so you need to think about solving this problem.

stabu-dev avatar Apr 19 '23 17:04 stabu-dev

updated...

nekit508 avatar Jun 22 '23 20:06 nekit508

Look nice but how does this work for mobile?

Otamamori917 avatar Jun 22 '23 23:06 Otamamori917

Since I don't think @Anuken will ever approve this, I suggest you make a library mod that does what your PR does.

stabu-dev avatar Jul 06 '23 09:07 stabu-dev

The point was to replace the categories enum with a class, but the library will not be able to do this.

nekit508 avatar Jul 08 '23 20:07 nekit508