Skip to content

Commit

Permalink
Nicer frames.
Browse files Browse the repository at this point in the history
  • Loading branch information
BOOtak committed Oct 8, 2019
1 parent 2854ad1 commit 7750c0a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 3 deletions.
Binary file modified game/assets/textures/frame_9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified game/assets/textures/frame_line_9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified game/assets/textures/frame_red_9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ private val useKeyboardDialog = HelperDialog(
400, 300, 550, 300,
"You can also use a keyboard.\n" +
"Press [RED]M[] for MOV, [RED]I[] for INT\n" +
"[RED]A[] for ADD, [RED]C[] for CMP\n" +
"[RED]0[] .. [RED]9[] for digits and\n" +
"[RED]A[], [RED]B[], [RED]X[] or [RED]Y[] for the registers"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,14 @@ class Editor(private val widthInBlocks: Int) {
setSymbolUnderCursor("MOV")
moveCursorRight()
}
in listOf('c', 'C') -> {
setSymbolUnderCursor("CMP")
moveCursorRight()
}
in listOf('a', 'A') -> {
setSymbolUnderCursor("ADD")
moveCursorRight()
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class CodeEditorState : IState {
private val inputProcessor = Gdx.input.inputProcessor
private lateinit var editor: Editor
private var showHelp: Boolean = false
private val cursorFrame: NinePatch by lazy { NinePatch(am.texture(Assets.Names.CURSOR_FRAME), 6, 6, 6, 6) }
private val errorFrame: NinePatch by lazy { NinePatch(am.texture(Assets.Names.ERROR_FRAME), 6, 6, 6, 6) }
private val cursorFrame: NinePatch by lazy { NinePatch(am.texture(Assets.Names.CURSOR_FRAME), 9, 9, 9, 9) }
private val errorFrame: NinePatch by lazy { NinePatch(am.texture(Assets.Names.ERROR_FRAME), 9, 9, 9, 9) }
private val buttonPanel = ButtonPanel { instruction: String, update: Boolean ->
when {
update -> editor.appendNumberUnderCursor(instruction[0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class PlottingScreenState : IState {
private var errorMessage: String? = ""
private lateinit var editor: Editor
private val cursorFrame: NinePatch by lazy { NinePatch(am.texture(Assets.Names.LINE_FRAME), 6, 6, 6, 6) }
private val errorFrame: NinePatch by lazy { NinePatch(am.texture(Assets.Names.ERROR_FRAME), 6, 6, 6, 6) }
private val errorFrame: NinePatch by lazy { NinePatch(am.texture(Assets.Names.ERROR_FRAME), 9, 9, 9, 9) }
private val font by lazy { am.font(Assets.Names.FONT_BIG_GREEN) }
private val editorRender: EditorRender by lazy {
EditorRender(
Expand Down

0 comments on commit 7750c0a

Please sign in to comment.