Skip to content

Commit ec3f7dc

Browse files
committed
refactor: removed deprecated loadCursorImage()
1 parent 4fa21a8 commit ec3f7dc

File tree

3 files changed

+0
-29
lines changed

3 files changed

+0
-29
lines changed

fxgl/src/main/kotlin/com/almasb/fxgl/app/services/FXGLAssetLoaderService.kt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -238,22 +238,6 @@ class FXGLAssetLoaderService : AssetLoaderService() {
238238
return load(MUSIC, url)
239239
}
240240

241-
// TODO: remove in future version
242-
/**
243-
* Loads cursor image with given name from /assets/ui/cursors/.
244-
* Either returns a valid image or throws exception in case of errors.
245-
*
246-
* @param name image name without the /assets/ui/cursors/, e.g. "attack_cursor.png"
247-
* @return cursor image
248-
* @throws IllegalArgumentException if asset not found or loading error
249-
*/
250-
@Deprecated("Place cursor under textures/ and use loadImage() instead")
251-
fun loadCursorImage(name: String): Image {
252-
val url = getURL(CURSORS_DIR + name)
253-
254-
return load(IMAGE, url)
255-
}
256-
257241
/**
258242
* Loads resource bundle with given [name] from "/assets/properties/".
259243
*

fxgl/src/test/kotlin/com/almasb/fxgl/app/AssetLoaderServiceTest.kt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -274,19 +274,6 @@ class AssetLoaderServiceTest {
274274
assertThat(map.getString("testKey"), `is`("testValue"))
275275
}
276276

277-
@Test
278-
fun loadCursorImage() {
279-
var cursorImage = assetLoader.loadCursorImage("test_cursor.png")
280-
281-
assertThat(cursorImage, `is`(notNullValue()))
282-
assertThat(cursorImage.width, `is`(64.0))
283-
assertThat(cursorImage.height, `is`(64.0))
284-
285-
cursorImage = assetLoader.loadCursorImage("bla-bla")
286-
287-
assertThat(cursorImage, `is`(notNullValue()))
288-
}
289-
290277
@Test
291278
fun loadUI() {
292279
var count = 0
Binary file not shown.

0 commit comments

Comments
 (0)