FileHandleResolver uses a given list of Resolutions to determine the best match based on the current back
buffer size. An example of how this resolver works:
Let's assume that we have only a single Resolution added to this resolver. This resolution has the following
properties:
portraitWidth = 1920portraitHeight = 1080folder = "1920x1080"
One would now supply a file to be found to the resolver. For this example, we assume it is "textures/walls/brick.png".
Since there is only a single Resolution, this will be the best match for any screen size. The resolver will now try to
find the file in the following ways:
"textures/walls/1920x1080/brick.png""textures/walls/brick.png"
The files are ultimately resolved via the given {baseResolver. In case the first version cannot be resolved, the
fallback will try to search for the file without the resolution folder.
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| protected final FileHandleResolver | |
| protected final ResolutionFileResolver. |
| Access | Constructor and Description |
|---|---|
| public | ResolutionFileResolver(FileHandleResolver
The baseResolver, ResolutionFileResolver.FileHandleResolver that will ultimately used to resolve the file.A list of descriptorsResolutions. At least one has to be supplied.Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static ResolutionFileResolver. | |
| public FileHandle | |
| protected String |
| baseResolver | back to summary |
|---|---|
| protected final FileHandleResolver baseResolver | |
| descriptors | back to summary |
|---|---|
| protected final ResolutionFileResolver. | |
| ResolutionFileResolver | back to summary |
|---|---|
| public ResolutionFileResolver(FileHandleResolver baseResolver, ResolutionFileResolver. Creates a
| |
| choose | back to summary |
|---|---|
| public static ResolutionFileResolver. | |
| resolve | back to summary |
|---|---|
| public FileHandle resolve(String fileName) Implements com.
| |
| resolve | back to summary |
|---|---|
| protected String resolve(FileHandle originalHandle, String suffix) | |
| Modifier and Type | Field and Description |
|---|---|
| public final String | folder
The name of the folder, where the assets which fit this resolution, are located. |
| public final int | |
| public final int |
| Access | Constructor and Description |
|---|---|
| public | Resolution(int
This resolution's width. portraitWidth, int This resolution's height. portraitHeight, String The name of the folder, where the assets which fit this resolution, are located. folder)Constructs a |
| folder | back to summary |
|---|---|
| public final String folder The name of the folder, where the assets which fit this resolution, are located. | |
| portraitHeight | back to summary |
|---|---|
| public final int portraitHeight | |
| portraitWidth | back to summary |
|---|---|
| public final int portraitWidth | |
| Resolution | back to summary |
|---|---|
| public Resolution(int portraitWidth, int portraitHeight, String folder) Constructs a
| |