-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'Move to Top' and 'Move to Bottom' ops for movables in popup menu
- Loading branch information
Showing
3 changed files
with
118 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/main/kotlin/io/github/spair/strongdmm/logic/action/SwitchTileItemsAction.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.github.spair.strongdmm.logic.action | ||
|
||
import io.github.spair.strongdmm.gui.map.Frame | ||
import io.github.spair.strongdmm.logic.map.Tile | ||
|
||
class SwitchTileItemsAction( | ||
private val tile: Tile, | ||
private val item1: Int, | ||
private val item2: Int | ||
) : Undoable { | ||
override fun doAction(): Undoable { | ||
tile.switchTileItems(item1, item2) | ||
Frame.update(true) | ||
return SwitchTileItemsAction(tile, item2, item1) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters