Skip to content

NotificationServiceProvider accesses scene width and height only once #934

Open
@AlmasB

Description

@AlmasB

Describe the bug
If the game is then resized and auto scale is false, then notifications won't be centered.

Additional context / possible fixes
A fix is to slightly change internal API to bind to sceneService.prefWidthProperty()

Start from NotificationServiceProvider, L47.

private val notificationView by lazy {
ReflectionUtils.newInstance(notificationViewClass).also {
it.appWidth = sceneService.prefWidth.toInt()
it.appHeight = sceneService.prefHeight.toInt()
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    codefest23-24difficulty:mediumAPI design elements, need time to think throughhelp wantedContributions welcome / high PR acceptance ratelang:kotlin-onlySolution should be in Kotlintype:bugDoesn't behave according to specification

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions