inventory ui

icon in list


Former-commit-id: 7182dcda408d9710d77e25e357f3a67bdd42fff9
This commit is contained in:
Song Minjae
2017-03-22 23:58:18 +09:00
parent 23f6f9cf5a
commit d390217ba9
18 changed files with 274 additions and 101 deletions

View File

@@ -102,9 +102,23 @@ object Terrarum : StateBasedGame(GAME_NAME) {
if (fontGame != null) (fontGame as GameFontImpl).reload()
}
var fontGame: Font? = null
var fontGame: Font = object : Font {
override fun getHeight(str: String?) = 0
override fun drawString(x: Float, y: Float, text: String?) {}
override fun drawString(x: Float, y: Float, text: String?, col: Color?) {}
override fun drawString(x: Float, y: Float, text: String?, col: Color?, startIndex: Int, endIndex: Int) {}
override fun getWidth(str: String?) = 0
override fun getLineHeight() = 0
} // null font
private set
lateinit var fontSmallNumbers: Font
var fontSmallNumbers: Font = object : Font {
override fun getHeight(str: String?) = 0
override fun drawString(x: Float, y: Float, text: String?) {}
override fun drawString(x: Float, y: Float, text: String?, col: Color?) {}
override fun drawString(x: Float, y: Float, text: String?, col: Color?, startIndex: Int, endIndex: Int) {}
override fun getWidth(str: String?) = 0
override fun getLineHeight() = 0
} // null font
private set
var joypadLabelStart: Char = 0xE000.toChar() // lateinit
@@ -228,6 +242,10 @@ object Terrarum : StateBasedGame(GAME_NAME) {
@Throws(SlickException::class)
override fun initStatesList(gc: GameContainer) {
fontGame = GameFontImpl()
fontSmallNumbers = TinyAlphNum()
gc.input.enableKeyRepeat()
@@ -243,9 +261,6 @@ object Terrarum : StateBasedGame(GAME_NAME) {
println("[Terrarum] Locale: " + gameLocale)
fontGame = GameFontImpl()
fontSmallNumbers = TinyAlphNum()
// search for real controller
// exclude controllers with name "Mouse", "keyboard"
@@ -286,9 +301,9 @@ object Terrarum : StateBasedGame(GAME_NAME) {
//addState(StateBlurTest())
//addState(StateShaderTest())
//addState(StateNoiseTester())
//addState(StateUITest())
addState(StateUITest())
//addState(StateControllerRumbleTest())
addState(StateMidiInputTest())
//addState(StateMidiInputTest())
//ingame = StateInGame(); addState(ingame)