StrongJoshua / libgdx-inGameConsole

A LibGdx library that allows a developer to add a console (similar to how it is featured in Source games) to their game.
https://www.strongjoshua.net/projects/games/libgdx-ingame-console
Apache License 2.0
132 stars 34 forks source link

Fail to compile on GWT #33

Closed BenMcLean closed 6 years ago

BenMcLean commented 6 years ago

I'm currently getting this compilation error on GWT:

Compiling module net.benmclean.planetgenerator.GdxDefinition Tracing compile failure path for type 'com.strongjoshua.console.ConsoleUtils' [ERROR] Errors in 'jar:file:/C:/Users/[MY USERNAME HERE]/.gradle/caches/modules-2/files-2.1/com.github.BenMcLean/libgdx-inGameConsole/703cc7f896/f15812e13f5df40710a975d17039035913274d85/libgdx-inGameConsole-703cc7f896-sources.jar!/com/strongjoshua/console/ConsoleUtils.java' [ERROR] Line 26: The method currentThread() is undefined for the type Thread

It's referencing my fork, but my fork has no changes to ConsoleUtils.java so this is something affecting the original too.

BenMcLean commented 6 years ago

I fixed it in this commit here where I removed the reference to Thread.currentThread because this method is not supported by GWT.

BenMcLean commented 6 years ago

OK even after getting it to compile in GWT, the CommandExecutor does not work on GWT. To be clear: it works on Desktop but on GWT, it'll show what you typed, but won't execute any of the commands. This may have to do with GWT not supporting reflection. I think a way to fix this might be changing the interface to let users associate commands with methods.

StrongJoshua commented 6 years ago

Closing this cause of inactivity. If this is still a problem, please open up a new issue and I'll look into it.