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

Anyone know how to not cut off the folder background image? #57

Closed
davidrenne opened this issue Apr 16, 2015 · 6 comments
Closed

Anyone know how to not cut off the folder background image? #57

davidrenne opened this issue Apr 16, 2015 · 6 comments

Comments

@davidrenne
Copy link

https://www.dropbox.com/s/touocjp2iakkxmq/Screenshot%202015-04-15%2020.56.16.jpg?dl=0

Any ideas? Seems like after so many games it cuts off on OSX.

@alinebee
Copy link
Owner

Finder does not tile folder backgrounds, and it limits background images to a maximum of 8000x8000 pixels or the maximum texture size of your GPU, whichever is smaller. Boxer generates a background as large as it can, but this is not enough for folders with lots of games.

Finder's limits are unfortunately out of Boxer's control; the problem can only really be avoided by replacing the folder background hack with a full in-app browser UI (which would be able to display the games however it likes).

The workaround for now is to organize your games into subfolders. When you next click "Browse your games" in Boxer, it will apply the shelf background style to all subfolders it finds in the DOS Games folder.

@davidrenne
Copy link
Author

Thank you so much for that info! I will create sub directories

@davidrenne
Copy link
Author

While I have you on here. If I were to recompile the project to automatically fetch images. How might I accomplish that and which files should be noted to add that feature?

@alinebee
Copy link
Owner

What do you mean by automatically fetch images?

@davidrenne
Copy link
Author

Well to go out to a domain or google search for "DOS GAME" + Automatically generated name in your text box.

https://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=DOS%20Game%203%20Demon

Get some JSON images and then fetch the first image and people could just remove these or overwrite them if they are incorrect.

Unfortunately my apple email is not on a "Mac development team" and I dont want to spend 99 dollars a year just to recompile this thing. Apple really steals dev money here with this annual subscription.

@alinebee
Copy link
Owner

You should be able to compile Boxer without a developer account by doing the following steps:

  1. click on the blue "Boxer" entry at the top of the sidebar to display the Boxer project settings.
  2. Select "Boxer" under the "Targets" heading.
  3. Set the "Signing" toggle from "Developer ID" to "None".

As for automatically fetching cover art for a game... you may want to start with _generateGameboxWithError: in BXImportSession.m, line 1521 and onward. When importing a game, BXImportSession first checks the game's folder to see if it contains an icon file that could be used. If it can't find one, it generates a "bootleg" icon (e.g. a picture of a CD case with the game's name written on it) and uses that instead.

You could add an intermediate step in that method that hits the google image search API, downloads the image for the top result, converts it to an NSImage and supplies that image as the icon. If you want Boxer to apply its shiny box appearance to the image as well, then you can call [BXCoverArt coverArtWithImage: theImageYouDownloaded] and get a cover-artified NSImage back.

(The _generateGameboxWithError: method is expected to run synchronously, and a network request would thus have to block execution until it gets a response. That method and its call site should be redesigned to be properly asynchronous, but that is a larger undertaking that's not critical to the initial implementation of your feature.)

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

No branches or pull requests

2 participants