Skarn Posted November 2, 2021 Share Posted November 2, 2021 (edited) Hi, Before I get into bigger ideas / projects - this is my first plugin if anyone would like to review / test. Two new game context menu options: Search Cover Simple opens your browser to Google Images with the game platform and title as search parameters. Paste Image Copies an image in the clipboard (e.g. right-click image in browser and select 'Copy Image') to the game's images folder for the Image Type selected. Paste Image options There are options available for the "Paste Image" function in the Tools > Paste Image Settings menu. By default the "Paste Image" command will save to the game's region image sub-folder. If "Ignore Region" is turned on, it will save to the game's platform folder. If "Delete other images" is turned on, it will delete existing images for the Image Type selected. If both options are turned on, all images for the Image Type selected will be deleted, leaving only the pasted image. This is actually my use case - I wanted as shortcut to force the new image to be the only one available for LaunchBox to display. Please refer to the git hub readme.md for full detail, code review and feedback and bugs are welcomed. https://github.com/Skarnivorous/LaunchBoxPasteImage Edited November 2, 2021 by Skarn 5 Quote Link to comment Share on other sites More sharing options...
Fry Posted November 2, 2021 Share Posted November 2, 2021 This is really cool feature and thank you for sharing the code! I am still relatively new to WPF and C# so I’m going to make good use of some of these techniques. The code is nice and clean. 1 Quote Link to comment Share on other sites More sharing options...
Fry Posted November 2, 2021 Share Posted November 2, 2021 Enhancement request- would love to include paste image options for Clear logo and fan art background as well. 1 Quote Link to comment Share on other sites More sharing options...
Skarn Posted November 2, 2021 Author Share Posted November 2, 2021 I am cautious about the approach honestly, there are quite a few scenarios where having multiple images for an Image Group are very valid. Launchbox either cycles or randomly selects from images when multiple apply or it uses region preferences etc. Perhaps I should switch to more of a tool window approach where it can be chosen more clearly what "kind of paste" needs to happen as whether you keep existing images / follow region really can change. Thanks for kind comments about code, but already I am revising how I'll lay it out. The Settings class needs to be more safe/robust for adding/removing new settings and I have very little error handling. Need to make sure I'm closing all streams and I've left a few unused references here and there. One big thing I haven't tested is what happens to games with international characters! I should see how Launchbox names the images for those. Also the whole -01 filenaming I now see is irrelevant. I was hoping Launchbox used the naming order as a preference, but as far as I can tell, it is random selection if multiple 01,02,03 etc. exists. All good things to learn and the whole reason for this first "simple" plugin. Quote Link to comment Share on other sites More sharing options...
Fry Posted November 3, 2021 Share Posted November 3, 2021 23 hours ago, Skarn said: Perhaps I should switch to more of a tool window approach where it can be chosen more clearly what "kind of paste" needs to happen as whether you keep existing images / follow region really can change. Yeah one way is you could get rid of the setting and make that selection an additional context sub-menu that the user has to choose each time. so once you click paste box front another sub menu opens with options for add image and replace all images. Not sure if that would feel like too much clicking? Quote Link to comment Share on other sites More sharing options...
Skarn Posted November 3, 2021 Author Share Posted November 3, 2021 Yeah, it's tricky to get the balance between convenience and flexibility. Once there is too many choices/actions, it becomes more sensible to just make it a full utility. Ultimately it's probably not a requirement many have - people would be more inclined to just add as many cover images as they like, and let LaunchBox do its logic in selecting one for display. Maybe as the user is 'initiating' the paste for a reason, showing a window of all the images currently allocated to the game with 'delete' buttons on each would give the user more autonomy is deciding if they want to 'clean up' images as part of the action and also confirm visually what is already there. That window could also have a 'remove all' button. The next logical extension is for multiple games to be selected, and have a window with a 'Next/Previous' button on it and let the user move through the selections and take action on searching / pasting / deleting images Quote Link to comment Share on other sites More sharing options...
Fry Posted November 3, 2021 Share Posted November 3, 2021 Totally agree. More options, better for the user but clutters the user experience. Less options, less functionality for the user but gives a cleaner user experience. I like the replace all option because for my eclipse theme, you want clean consistent images so I am always looking for the one clear logo, one box front, and one fan art background that I want to use and delete the rest. I know there are other cases where people want to have as many images as possible and let big box cycle through them. Quote Link to comment Share on other sites More sharing options...
KaaMoS Posted November 21, 2021 Share Posted November 21, 2021 What at a cool feature, friend! Billie it will be released here pretty soon! Quote Link to comment Share on other sites More sharing options...
Praeses Posted September 23, 2022 Share Posted September 23, 2022 This makes things much easier! Thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.