Rsgm / Hakd

Just a hacking game.
MIT License
25 stars 1 forks source link

Error in hakd.gui.windows.deviceapps.TextEdit #6

Closed BrendenChurch closed 10 years ago

BrendenChurch commented 10 years ago

Missing an import on line 15, TextArea, when I import it from java.awt, there is a constructor error.

BrendenChurch commented 10 years ago

FYI: I imported source into Eclipse, I am adding sources to make one packaged jar. This is the only error that came up.

BrendenChurch commented 10 years ago

Another error in the same file, on line 35

buttonTable.add(open, save, close);

Gives error:

The method add(String, String, Color) in the type Table is not applicable for the arguments (Button, Button, Button)

Quickfixes: -Remove arguments to match add() -Remove arguments to match add(Actor)

BrendenChurch commented 10 years ago

@Rsgm

Rsgm commented 10 years ago

One second this will be a long-ish comment.

BrendenChurch commented 10 years ago

Thanks for doing this, I want to learn the OpenGL API through looking in the code, but I also want to play it (sounds fun)

Rsgm commented 10 years ago

I don't think I used awt at all, everything to do with graphics uses libGDX(an amazing graphics library). You might not learn much about openGL because I mostly use high level openGL stuff(meaning I don't specify meshes/triangles and how/where to apply textures, libGDX handles all of that).

I should have explained how to set up the project to edit the code better in the readme.

The build system(gradle) is able to generate a project file for Hakd, for both eclipse and intelij. So, you probably want to delete what you have and re download the source, so nothing gets messed up.

In the command prompt go to the hakd source code directory. Then type ./gradlew.bat tasks to download gradle and view the commands.

After that type ./gradlew.bat eclipse to set up an eclipse project.

Now, you may have to run ./gradlew.bat run to run it. This will should download the required dependencies, if they were not downloaded by now. I am not sure if gradle dependencies will work with eclipse. If they do, then you can let eclipse run/debug hakd.

Rsgm commented 10 years ago

On last warning. There is an java error I left in the last commit. The error will be fixed whenever libGDX updates their nightly build which I expected to be out a few days ago.

https://github.com/Rsgm/Hakd/blob/f994873f32d4a13e08c49a485b8902e5f859a4f6/src/main/java/hakd/gui/windows/deviceapps/TextEdit.java#L110-L117

These will say display.getLinesShowing does not exist(not yet at least). So comment it out and wait for libGDX to update.

Rsgm commented 10 years ago

Tell me if you need any more help with gradle/building the project files.

Also you may want to delete the .idea/ folder and Hakd.iml/ipr/iws. Those are all created by the intelij project, but eclipse might just ignore them.