My UI components in the runJS are not visible. Sad...
# korge
t
My UI components in the runJS are not visible. Sadly this prevents me from commit my game. It uses a client-server architecture with websockets, which I got only working on the Browser. So testing it on the JVM in a Singleplayer Demo mode works, but does't make sense for the gameplay.
JVM
Web
n
@Deactivated User quickfix ? 🙂
t
d
is tehere a way to reproduce it easy?
t
Of course the game is still not finished, and don't have the time to investigate the technical problem. But you can see it with
runJS
on my project.
I also tried it with websockets disabled... but it's the same (
NetworkBridge#init
)
d
checking
n
on mac the gui is not displayed on
runJvm
nor
nativeDebug
either
d
it seems to be a similar problem to the pong, since if you change the initial JVM window size to not be the same as the virtua lsize reproduces again. So it seems to be a matter to using width and height values that are not right. I think we should hide a little bit the width and height values other than the normal virtualWidth, virtualHeight. I'm checking the places where it is used, I'll make a PR once I fix it
n
@tobse You can of course still commit your game when you include the sources. If necessary, we build it ourselves against a new KorGE version
d
in this case it seems to be the align* variants, not the width/height itself. Going to investigate
Fixed here: https://github.com/korlibs/korge/pull/215 going to make a release and you will just need to update version. No code changes required in your code
Will be fixed in:
Copy code
1.13.3.0
Just triggered publishing. So it will be available in around 30 minutes
t
Thanks for the late night fix. It solved a most of the relative positioning problems. But not all... The faq-image was position to the center of the root view:
Copy code
centerOn(rootView)
And all
onClick
events are still broken on JS. And the position of my magnifier changed on both, Jar & JS:
Copy code
val actionSearch = image(res.uiActionSearch) {
    anchor(0.0, 1)
    alignLeftToRightOf(movePlayerUp, 5.0)
    alignBottomToTopOf(movePlayerRight, 5.0)

    onClick { sendUiEvent(Action.ActionSearch) }
r
@tobsef try to remove
anchor(...)
t
@RezMike Tanks... Ok it makes sense.. without
anchor
I can move my magnifier to the correct pos.
d
align* doesn't fully support anchoring right now