mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-09 18:14:06 +09:00
custom keyboard handling wip
This commit is contained in:
@@ -133,7 +133,7 @@ class UIBuildingMakerPenMenu(val parent: BuildingMaker): UICanvas() {
|
||||
}
|
||||
|
||||
// primary click
|
||||
if (Gdx.input.isButtonPressed(App.getConfigInt("config_mouseprimary"))) {
|
||||
if (Terrarum.mouseDown) {
|
||||
// close by clicking close button or out-of-boud
|
||||
if (mouseVec.distanceSquared(RADIUS, RADIUS) !in CLOSE_BUTTON_RADIUS.sqr()..RADIUSF.sqr()) {
|
||||
closeGracefully()
|
||||
@@ -175,7 +175,7 @@ class UIBuildingMakerPenMenu(val parent: BuildingMaker): UICanvas() {
|
||||
batch.draw(ItemCodex.getItemImage(slotConfig[i]), x - 16, y - 16, 32f, 32f)
|
||||
|
||||
// update as well while looping
|
||||
if (i == mouseOnBlocksSlot && Gdx.input.isButtonPressed(App.getConfigInt("config_mouseprimary"))) {
|
||||
if (i == mouseOnBlocksSlot && Terrarum.mouseDown) {
|
||||
parent.setPencilColour(slotConfig[i])
|
||||
closeGracefully()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user