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

Update settings window #559

Merged
merged 35 commits into from
Dec 28, 2023
Merged

Conversation

GriffinRichards
Copy link
Collaborator

@GriffinRichards GriffinRichards commented Dec 9, 2023

  • Divides the Project Settings window into tabs so it doesn't get too long vertically
  • Adds support for custom block layouts (i.e. specifying number and arrangement of bits given to metatile ID, collision, and elevation). Closes Suggestion: option to set the number of Metatile in the porymap.project.cfg #500
  • As part of supporting the above, add settings to swap out the collision/elevation image selector. This also allows people to make a selector that uses the full range of collision values, or swap it out for aesthetic reasons.
  • Update the collision tab UI, including a zoom slider and spinners that let users select the full range of collision/elevation values, regardless of whether they're represented on the selector.
  • Adds settings for custom default event icons and custom pokémon icons (see first comment for explanation of the latter)
  • Adds a warning to warp events that alerts users if it's not on a warp behavior. The list of behaviors can be edited in the settings
  • Adds settings to override the symbol and macro names that Porymap expects. Closes Expose symbol and constant names #564
  • Fixes Can paint metatiles on the collision tab at opacity 0 #558
  • Fixes Porymap can crash closing the settings window #565
  • Fixes Porymap can crash if File -> Reload Project fails #566
  • Update "Editing Map Collisions manual page
  • Update "Project Files" manual page
  • Update "Settings and Options" manual page
  • Update changelog
  • More testing

@GriffinRichards
Copy link
Collaborator Author

GriffinRichards commented Dec 11, 2023

Updated with two changes that are somewhat related (but mostly dependent on) this PR:

  • Porymap requires a specific format and multiple C files to parse the paths of pokémon icons. Now if this fails (which happens even for a few vanilla icons) Porymap will try to predict the path of the icon. If this also fails, a new setting was added to explicitly specify the icon for any species.
  • Stop evaluating C defines that Porymap only needs the name of. This has the benefit of being faster, stops some spurious error logging, and gives some lists of defines a more sensible order (the order they were defined in by the project). It also means Porymap no longer needs to parse opponents.h to order the flags

@GriffinRichards GriffinRichards changed the title Update the Collision tab Update the Collision tab & add custom image settings Dec 11, 2023
@GriffinRichards GriffinRichards marked this pull request as draft December 16, 2023 07:37
@GriffinRichards GriffinRichards changed the title Update the Collision tab & add custom image settings Update settings window Dec 16, 2023
@GriffinRichards GriffinRichards marked this pull request as ready for review December 19, 2023 18:57
Copy link
Collaborator

@garakmon garakmon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One general little thing I noticed is that when you close the settings window without saving the changes, it will keep the edited values instead of the "correct" values.

For example, if I changed the first identifier but closed the window without saving the changes it will still load with my garbage text.

Seems great otherwise, although I haven't had time to test every single setting being updated yet/

src/core/bitpacker.cpp Show resolved Hide resolved
forms/projectsettingseditor.ui Show resolved Hide resolved
@GriffinRichards
Copy link
Collaborator Author

GriffinRichards commented Dec 23, 2023

One general little thing I noticed is that when you close the settings window without saving the changes, it will keep the edited values instead of the "correct" values.

For example, if I changed the first identifier but closed the window without saving the changes it will still load with my garbage text.

Could you give a more specific example with a set of steps you took? I can't reproduce this. When I edit a setting, close the window (with Cancel or x), and reopen the window, none of my unsaved changes persist.

EDIT: No bug, just a misread prompt. Will update prompt text to make it clearer

@GriffinRichards GriffinRichards merged commit 6a8d3a8 into huderlem:master Dec 28, 2023
3 checks passed
@GriffinRichards GriffinRichards deleted the custom-images branch December 28, 2023 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants