1014 Commits

Author SHA1 Message Date
Kurt
5e4b757984 Add gen4 battle video i/o and quick preview
fixes extrablock validation check
probably need to separate the object from the block, but whatever works as-is.
2026-09-06 22:33:10 -05:00
Kurt
90b265a8f3 Add hover tooltip for Met Location ID peek 2026-08-16 16:49:33 -05:00
Kurt
c0b78e6b6a Batch Editor: undo, enhancements
if you close the form after running a batch edit, it allows you to undo
if you want to undo while the form is still up, you can reset back to the initial state
buttons only enable when sufficient progress/available slots (so it doesn't run on 0/0)
shows a live-updating count of how many pkm slots will be edited by your currently entered command
2026-08-16 02:30:29 -05:00
Kurt
146172f618 Minor clean
parenthesis, trailing spaces, other info-warning clean fixes
2026-08-12 22:37:31 -05:00
Kurt
2e64de8e9d ComboBox suggest: Remove dropdown on keydown
Windows.Forms quirk where it don't hide the dropdown when it tries to Suggest via the separate Suggest pop-down.
Since all comboboxes that do the databind+suggest are impacted by this, just add the event when initializing binding. There don't appear to be any reapply-binding cases where it is set to suggest (only case is Battle Revolution save select, which isn't textual entry).

Closes #4846
2026-08-01 10:05:04 -05:00
Kurt
f901e9753f Update SAVEditor.Designer.cs
increase sav editor button height so 2 rows of text can render if needed
2026-07-19 11:15:51 -05:00
Kurt
8c15ee4617 Minor tweaks
Tab indexing in save force loader, some anchoring/visibility preference
Hide SID on Trainer control update when in gen1/2 (refactor miss)
2026-07-06 03:25:36 -05:00
Kurt
48aeee584e Add option to output champions SP on hover
Converts EVs and displays the associated values it would have if transferred to Champions.
2026-07-03 20:16:58 -05:00
Alex
b9d85427cb Localize Settings, About shortcuts, Language menu, and save Block Data editors (#4829)
* Localize Settings PropertyGrid, Language menu, and About shortcuts

- Add PropertyGridLocalization: a TypeDescriptor-based wrapper that
  localizes the Settings editor PropertyGrid using the existing
  lang_*.txt resources - tab names, property display names, categories,
  bool/enum values, dropdown standard values, and expandable object
  summaries. Translated enum/bool text is mapped back to the original
  value on write; ambiguous translations defer to the default converter.
  Providers are registered once per settings instance (tracked via
  ConditionalWeakTable) so repeated openings do not stack providers, and
  the localizer dictionary is swapped on language change.
- Replace the Options -> Language ToolStripComboBox with a regular
  drop-down submenu of checkable language items.
- Load the About window Shortcuts tab from a per-language
  shortcuts_*.txt resource matching the current program language,
  falling back to the English resource when no localized copy exists.
- Add the new translation keys for all 10 supported languages;
  zh-Hans/zh-Hant additionally include translated property names
  (other languages fall back to the raw property name).
- Update shortcuts.txt to reference the current Unicode setting path
  (Options -> Settings -> Display -> Unicode).

* Localize remaining Settings options and SAV Block Data editors

- Settings: add zh display names for the property names, nested type
  names, and settings sections that were previously missing; translate
  GameVersion enum dropdown values in all 10 languages by sourcing each
  language''s own game-name strings (combined versions like RSE/FRLG
  hand-translated for zh, English elsewhere).
- SAV tab Block Data: route all three PropertyGrid editors through
  PropertyGridLocalization - the Simple Editor fallback form (Gen1-4,
  now with a translated title), SAV_Accessor (Gen5-7), and
  SAV_BlockDump8 (Gen8+). Add zh display names for the Gen3 save file
  properties shown in the Simple Editor.

* Localize SAV property view records, plain objects, and Gen3 coverage

- Record types (SaveFileMetadata/SaveFileState) now synthesize localized
  summaries instead of the compiler ToString; plain PKHeX objects without
  a meaningful ToString override show a translatable type name instead of
  the namespace-qualified default (ValueType.ToString is not treated as
  an override).
- Add zh-Hans/zh-Hant keys covering the SAV3 R/S/E/FR/LG property
  surface, nested block types, Memory segments, EntityContext and
  TrainerIDFormat enums, and the checksum-valid value string.

* Translate new localization keys for all supported languages

Replace the English placeholder values and add the previously zh-only
display-name keys with real translations for de/es/es-419/fr/it/ja/ko:
settings tabs, property display names, category/bool/collection values,
enum dropdown values, nested type names, and the SAV block-data
property surface. English keeps the raw property-name display.
Game pair names use each language's official game titles.

* Adjustments for maintenance purposes

Translation key=value pairs are automatically generated and the list grows/trims automatically as elements are added to the GUI. The pull request did not update the reflection traversal of the assembly -- key=values must survive the regeneration process (aka, be traversed automatically or manually) in order to stay in the translation file. It is not a manually curated file for add/remove.

Typename localization not very worthwhile. Property name localization and enums are a value add.

DevUtil crawler now adds enums to the translation file as it discovers them used in a property's type.

Am going to strictly refuse PropertyGrid localization of SaveFile/Accessor property grid displays. There are far too many properties to localize, and the property names are subject to change as the codebase is maintained. Settings are much more "stable" and thus acceptable for property name localization.

Downside: the shortcuts text file was very tedious to update every time I added a new hidden shortcut. A better path forward would be to use attributes on methods to tag them as "hey a shortcut exists here, the hotkeys trigger `behavior` string", and the program dumps them into the shortcut log.

The WinFormsTranslator probably needs to be rewritten to be an object (less primitive obsession) so that it can store multiple kvp sets for a language, and dump them to separate files with specific serializer methods. The GUI localization for form controls can be one, shortcuts another, property grid another. The property grid localization can be better arranged so that LocalizedDescription is alphabetically logged below the PropertyName, and can also have PropertyType if it is class-based.

Too much effort for very little value add, at least for me.

Order tabs in Settings order alphabetically.
Removed non-saved-gameversion selections. Stuff like E/FRLG are currently workarounds for Encounter Templates that shouldn't use GameVersion like that. I have a long-term goal to eventually remove the lumped GameVersion values entirely, and have a GameVersionRestriction enum specific for each game, and an interface that can check if a GameVersion can arise from the restriction.
2026-07-03 19:18:41 -05:00
Kurt
646456f5a0 Minor tweaks 2026-07-03 10:08:12 -05:00
Kurt
404d89b57e Add support for game specific fonts
Closes #4493
Future pull requests may be added with other font files to add game-specific font files (such as Gen1/2 having JPN/KOR/INT in the pixelated style like SciresM/Rhydon)

For now, the Control provides via EntityContext. If we need to provide different granularity, maybe another enum would be OK. Possibly add that as a property to IStringConverter.
2026-06-28 23:51:06 -05:00
Kurt
25e3c4d352 Add Gen1/2=>7 VC pp table & check bypass
ty anubis, santacrab, and Bowarcky for testing & data aggregation

Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
Co-Authored-By: santacrab2 <79347566+santacrab2@users.noreply.github.com>
Co-Authored-By: Bowarcky <54773567+bowarcky@users.noreply.github.com>
2026-06-27 18:02:53 -05:00
Kurt
8a1e1711eb Misc tweaks
SelectionLength => Select (avoid winapi fetch of SelectionStart), no functional change
Rename DisallowSearch => IsSearchAllowed (check a positive, not a negative)
Fix some stale xmldoc refs
Remove some unused usings
Small preference tweaks (aka resharper yelling at me)
2026-06-25 23:46:16 -05:00
Kurt
1f556062db Extract common egg location check logic
Handles 658 for mainline-legitimate values (none?), better to be correct.
Adds in a link traded egg checks for unhatched static eggs in Gen6 (previously unchecked)
2026-06-22 23:25:15 -05:00
Kurt
fdb5aa2ef8 Update ExperienceBar.cs 2026-06-20 15:14:16 -05:00
Kurt
2fd6d70756 Improve interactivity with exp bar
now supports click+drag, includes tooltip to show remaining exp, % progress, and can hold control to only tooltip current EXP rather than cursor position.
2026-06-20 00:46:18 -05:00
Kurt
9b89c0f330 Misc tweaks
Flag EVs in PLA if no EXP gained (similar to Gen1)
Make exp bar background different from the tab background
Add more "was touched" checks for PLA
remove empty xmldoc declarations
2026-06-19 22:25:57 -05:00
Kurt
bbef47e0bd Localize StatNature => Stat Alignment
bulbapedia's Contest Stat nature amp table for neutral natures is wrong lol
https://bulbapedia.bulbagarden.net/wiki/Contest_condition#Natures
2026-06-14 14:58:40 -05:00
Kurt
3e6895b906 Misc tweaks
Show item sprites for TM/HM in inventory editor, just be more general on the Lumped image method
Rework Trainer ID, now updates tooltip as you change TID. Components are separate controls.
Re-flow Chatter editor GUI
Add Experience bar to pkm editor for more visual editing of the EXP. Matches scroll behavior of EXP/Level textboxes.
Exp bar can be hidden via settings.
2026-06-14 00:51:11 -05:00
Kurt
c514865082 Gen5: fix basculin-blue reckless ability handling
Closes #2058

so many spots needing updating:
- ability verifier (legality check)
- encounter template=>pk5 (generating)
- editor load abilities (show the ability in list)
- editor save ability (acknowledge ability index)
2026-06-10 23:40:30 -05:00
Kurt
740a3c5b90 Restore preview card on system wake
pc went to sleep, hover preview was missing (minimized?)
this workaround works, maybe I can deduplicate the dllimport in PokePreview, or make this more abstract for future hover card previews like encounters?
2026-06-10 23:19:55 -05:00
Kurt
edc6c7c29b Re-flow SAV editor button panels 2026-06-07 16:32:24 -05:00
Kurt
76c3b72ae4 Gen5: Flesh out a few more blocks, PGL editor
Run a quick translation of the save troubleshooter (force loader)
Adds a PGL editor GUI
Fleshes out the adventure info block, GTS block, and battle box block; thanks to the PGL DW effort aggregating over 100 save files to give a varied expression of fields :D
Fix SpriteUtil failing to yield an item sprite (due to the split of artwork-item/big-item, the method was never repointed).

fix wishmkr shiny request failing to return correctly; add in ganlon/salac item set
2026-06-07 15:50:53 -05:00
Kurt
2897b95723 Reduce padding in OT/Misc tab, gen6/7 was too tall 2026-06-02 22:31:20 -05:00
Kurt
5cbc796ad7 HGSS: Add Pokeathlon editor
Closes #4755
2026-05-26 00:26:10 -05:00
Kurt
2fb38b368a B2W2: extract medal editor, add habitat list
A bit more coherent to see a list of medals rather than one at a time.
Add a few more properties, along with the Habitat List.

Remove maximize box from Join Avenue editor, consistent with other editors.
2026-05-24 00:13:08 -05:00
Kurt
934ec2afe7 B2W2: Add Join Avenue & editor
Adds i/o to save/import individual visitors/etc
2026-05-23 14:13:38 -05:00
Kurt
5df994dbae database: settings to specify row count
Default rows changed from 11 => 9
min,max is now [5,20] to prevent stupid entry

ergonomics: 6 min for encdb, 4 min for mgdb, 9 min for pkmdb
2026-05-09 17:56:40 -05:00
Kurt
b8ebbebdbc Update 26.05.05 2026-05-04 22:47:30 -05:00
BtEtta
c2bb4188e5 Add a movement threshold for initiating drag & drop operations (#4794) 2026-04-26 16:49:49 -05:00
Kurt
75e2a7a497 Rearrange tab indexes to follow visual
Closes #4781
2026-04-17 23:10:10 -05:00
Kurt
452c8b5b81 Misc tweaks
SAV9ZA: Fix pc data import
SAV9ZA: More metadata writing for party; only write first `01` for non-basepatch saves.
2026-04-17 22:26:15 -05:00
Kurt
6b8599b6ed Revise PKM editor nickname check for gen4/5
Closes #4773
2026-04-11 18:33:00 -05:00
Kurt
4568392f61 Widen move 16px, extrabyte +4px
Shifted down extrabyte edits a little more for aesthetics.
Move combobox werent as wide as the relearn moves, so +16 to make them match.

update translation resources with latest additions
2026-04-11 10:45:51 -05:00
Kurt
2b4a01512e Add setting to quiet every other sound made
Closes #4774
2026-04-10 00:48:34 -05:00
Kurt
fc80208a06 Reattach form(arg) changed events
not sure how they were unhooked
slight unnoticeable tweaks to layout
2026-04-06 14:34:50 -05:00
Kurt
6da88d6232 Reflow pkm editor main & ot tabs as TableLayout
less designer code (-250) so I think this is a win

* Friendship moved to OT/Misc tab since it is much less relevant in current formats; HT now shows the friendship rather than flexing CurrentFriendship.
2026-04-05 23:48:23 -05:00
Kurt
5e7fc6c817 Rewrite formargument editing control
A fair bit of these SetPKM updaters need to stop touching FormArgument now.
2026-04-05 23:43:17 -05:00
Kurt
49505a4a8c Update EntitySearchControl.cs 2026-03-25 21:58:36 -05:00
Kurt
ecfd8f6748 Misc tweaks
Fix ranch lengths (I wonder if BK4's handling can be adapted to RK4 for these appended-to-entity fields -- I doubt they modified the PK4 struct)
2026-03-25 08:35:46 -05:00
Kurt
5bf1e2cf45 PKM: Reduce allocation via in-place decryption logic (#4764) 2026-03-24 21:31:59 -05:00
Kurt
793525875f Misc tweaks
no functional change

Preview: fix hover card's off-by-one on move index indication.
PB7: Initialize editor's default date-time to a valid value when none present/invalid.
ID32: move to extension block with other methods
PIDVerifier: use xor method from ShinyUtil rather than inlined (can stay inlined elsewhere)
battlepass: revise parens for clarity
2026-03-24 00:31:51 -05:00
Kurt
a43b6a5d32 Update 26.03.20 2026-03-20 22:10:14 -05:00
Kurt
48938c5e14 Minor clean 2026-03-19 20:35:58 -05:00
Kurt
0e097b1fc6 Minor slot hover performance improvements
Skip repaint on cursor moving the hover window
Cache reference to the slot interaction types and "nothing" slot image
Dispose of slot sprites when updating with a new one
If scrolling box/group, auto-update hover with the newly displayed slot's content instead of hiding
2026-03-19 17:25:06 -05:00
Kurt
3317a8bfda Add trash view/edit to all Trainer forms
Make PID text entry uppercase across the program
Standardize RivalTrash => RivalNameTrash, same for Rival => RivalName
2026-03-14 22:28:00 -05:00
Kurt
94f3937f2f Refactor: extract gen3 save block structures
Changed: Inventory editor no longer needs to clone the save file on GUI open
Changed: some method signatures have moved from SAV3* to the specific block
Allows the block structures to be used without a SAV3 object
Allows the Inventory editor to open from a blank save file.
2026-03-14 13:40:17 -05:00
Kurt
d3a4ed6ad3 Update PKMEditor.Designer.cs 2026-03-12 01:34:05 -05:00
Kurt
bb363a7a3d Re-flow Stat editor for alignment/showing all text
Some languages have localized these labels to long strings; previously they were truncated (probably frustrating); now, they all show (wrapped text is the best I can do -- better than truncating?)
2026-03-12 01:29:58 -05:00
Kurt
662c3db7dc Faster box hover preview
Render it manually rather than let controls be goofy with draw calls.
2026-03-09 20:28:43 -05:00