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

Minor Bug Fixes #37

Closed Blunderchips closed 6 years ago

Blunderchips commented 6 years ago

Two minor bug fixes. Changed the access modifies of five classes to from default public and fixed the parameters of two methods.

Change the parameters of the exception logging methods to use Throwable instead of Exception. ConsoleUtils.exceptionToString already uses Throwables.

Made the following classes public:

  1. CommandCompleter.java
  2. CommandHistory.java
  3. ConsoleContext.java
  4. Log.java
  5. LogEntry.java
StrongJoshua commented 6 years ago

Why do you think these classes all need to be public?

Blunderchips commented 6 years ago

I am attempting to make VisGUIConsole for my current project. I am achieving this by extending the AbstractConsole class and recreating the GUIConsole using visui components. To do this, access to those classes is required.

Is there any particular reason you want them protected?

The final commit changes a variable type in two of the logging methods. The methods currently log exceptions meaning that errors and general throwables can be logged. Your console utilities class already accepts throwables.

Blunderchips commented 6 years ago

TL;DR It gives users more control over the console which, for a library, is always good.

StrongJoshua commented 6 years ago

Sounds good. Was just curious.