mirror of
https://gitlab.com/cc-ru/ocelot/ocelot-desktop.git
synced 2025-12-20 02:59:19 +01:00
Add a chest node icon
This commit is contained in:
parent
ef506e6ddd
commit
ddac6101e2
BIN
sprites/nodes/Chest.png
Normal file
BIN
sprites/nodes/Chest.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 510 B |
Binary file not shown.
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 88 KiB |
@ -1,28 +1,28 @@
|
|||||||
BackgroundPattern 0 0 304 304
|
BackgroundPattern 0 0 304 304
|
||||||
BarSegment 357 349 16 4
|
BarSegment 403 349 16 4
|
||||||
ComputerMotherboard 305 129 79 70
|
ComputerMotherboard 305 129 79 70
|
||||||
Empty 506 126 1 1
|
Empty 508 36 1 1
|
||||||
EmptySlot 335 330 18 18
|
EmptySlot 335 330 18 18
|
||||||
Knob 385 129 50 50
|
Knob 385 129 50 50
|
||||||
KnobCenter 436 129 50 50
|
KnobCenter 436 129 50 50
|
||||||
KnobLimits 305 200 50 50
|
KnobLimits 305 200 50 50
|
||||||
ShadowBorder 505 15 1 24
|
ShadowBorder 505 0 1 24
|
||||||
ShadowCorner 301 305 24 24
|
ShadowCorner 301 305 24 24
|
||||||
TabArrow 502 0 8 14
|
TabArrow 502 165 8 14
|
||||||
buttons/BottomDrawerClose 354 330 18 18
|
buttons/BottomDrawerClose 354 330 18 18
|
||||||
buttons/BottomDrawerOpen 373 330 18 18
|
buttons/BottomDrawerOpen 373 330 18 18
|
||||||
buttons/OpenFMRadioCloseOff 242 402 7 8
|
buttons/OpenFMRadioCloseOff 502 117 7 8
|
||||||
buttons/OpenFMRadioCloseOn 250 402 7 8
|
buttons/OpenFMRadioCloseOn 499 330 7 8
|
||||||
buttons/OpenFMRadioRedstoneOff 502 87 8 8
|
buttons/OpenFMRadioRedstoneOff 502 72 8 8
|
||||||
buttons/OpenFMRadioRedstoneOn 502 96 8 8
|
buttons/OpenFMRadioRedstoneOn 502 81 8 8
|
||||||
buttons/OpenFMRadioStartOff 326 305 24 24
|
buttons/OpenFMRadioStartOff 326 305 24 24
|
||||||
buttons/OpenFMRadioStartOn 351 305 24 24
|
buttons/OpenFMRadioStartOn 351 305 24 24
|
||||||
buttons/OpenFMRadioStopOff 376 305 24 24
|
buttons/OpenFMRadioStopOff 376 305 24 24
|
||||||
buttons/OpenFMRadioStopOn 401 305 24 24
|
buttons/OpenFMRadioStopOn 401 305 24 24
|
||||||
buttons/OpenFMRadioVolumeDownOff 499 330 10 10
|
buttons/OpenFMRadioVolumeDownOff 359 349 10 10
|
||||||
buttons/OpenFMRadioVolumeDownOn 501 363 10 10
|
buttons/OpenFMRadioVolumeDownOn 370 349 10 10
|
||||||
buttons/OpenFMRadioVolumeUpOff 335 349 10 10
|
buttons/OpenFMRadioVolumeUpOff 381 349 10 10
|
||||||
buttons/OpenFMRadioVolumeUpOn 346 349 10 10
|
buttons/OpenFMRadioVolumeUpOn 392 349 10 10
|
||||||
buttons/PowerOff 392 330 18 18
|
buttons/PowerOff 392 330 18 18
|
||||||
buttons/PowerOn 411 330 18 18
|
buttons/PowerOn 411 330 18 18
|
||||||
icons/ButtonCheck 301 363 17 17
|
icons/ButtonCheck 301 363 17 17
|
||||||
@ -39,10 +39,10 @@ icons/HDD 386 381 16 16
|
|||||||
icons/LMB 500 147 11 14
|
icons/LMB 500 147 11 14
|
||||||
icons/Memory 403 381 16 16
|
icons/Memory 403 381 16 16
|
||||||
icons/NA 420 381 16 16
|
icons/NA 420 381 16 16
|
||||||
icons/NotificationError 499 165 11 11
|
icons/NotificationError 494 285 11 11
|
||||||
icons/NotificationInfo 500 129 11 11
|
icons/NotificationInfo 335 349 11 11
|
||||||
icons/NotificationWarning 494 285 11 11
|
icons/NotificationWarning 347 349 11 11
|
||||||
icons/RMB 487 165 11 14
|
icons/RMB 500 129 11 14
|
||||||
icons/RackMountable 437 381 16 16
|
icons/RackMountable 437 381 16 16
|
||||||
icons/SettingsSound 487 129 12 17
|
icons/SettingsSound 487 129 12 17
|
||||||
icons/SettingsUI 487 147 12 17
|
icons/SettingsUI 487 147 12 17
|
||||||
@ -55,8 +55,8 @@ icons/WaveSawtooth 426 363 24 10
|
|||||||
icons/WaveSine 451 363 24 10
|
icons/WaveSine 451 363 24 10
|
||||||
icons/WaveSquare 476 363 24 10
|
icons/WaveSquare 476 363 24 10
|
||||||
icons/WaveTriangle 474 330 24 10
|
icons/WaveTriangle 474 330 24 10
|
||||||
icons/WireArrowLeft 507 15 4 8
|
icons/WireArrowLeft 507 0 4 8
|
||||||
icons/WireArrowRight 507 24 4 8
|
icons/WireArrowRight 507 9 4 8
|
||||||
items/APU0 233 305 16 96
|
items/APU0 233 305 16 96
|
||||||
items/APU1 250 305 16 96
|
items/APU1 250 305 16 96
|
||||||
items/APU2 267 305 16 96
|
items/APU2 267 305 16 96
|
||||||
@ -118,18 +118,19 @@ items/WirelessNetworkCard0 356 268 16 16
|
|||||||
items/WirelessNetworkCard1 373 268 16 16
|
items/WirelessNetworkCard1 373 268 16 16
|
||||||
light-panel/BookmarkLeft 475 285 18 14
|
light-panel/BookmarkLeft 475 285 18 14
|
||||||
light-panel/BookmarkRight 355 363 20 14
|
light-panel/BookmarkRight 355 363 20 14
|
||||||
light-panel/BorderB 507 33 4 4
|
light-panel/BorderB 507 18 4 4
|
||||||
light-panel/BorderL 351 402 4 2
|
light-panel/BorderL 500 349 4 2
|
||||||
light-panel/BorderR 266 402 4 4
|
light-panel/BorderR 507 330 4 4
|
||||||
light-panel/BorderT 271 402 4 4
|
light-panel/BorderT 420 349 4 4
|
||||||
light-panel/CornerBL 276 402 4 4
|
light-panel/CornerBL 425 349 4 4
|
||||||
light-panel/CornerBR 281 402 4 4
|
light-panel/CornerBR 430 349 4 4
|
||||||
light-panel/CornerTL 286 402 4 4
|
light-panel/CornerTL 435 349 4 4
|
||||||
light-panel/CornerTR 291 402 4 4
|
light-panel/CornerTR 440 349 4 4
|
||||||
light-panel/Fill 506 123 2 2
|
light-panel/Fill 507 335 2 2
|
||||||
light-panel/Vent 502 15 2 38
|
light-panel/Vent 502 0 2 38
|
||||||
nodes/Cable 502 105 8 8
|
nodes/Cable 502 90 8 8
|
||||||
nodes/Camera 390 268 16 16
|
nodes/Camera 390 268 16 16
|
||||||
|
nodes/Chest 487 165 14 14
|
||||||
nodes/Computer 407 268 16 16
|
nodes/Computer 407 268 16 16
|
||||||
nodes/ComputerActivityOverlay 424 268 16 16
|
nodes/ComputerActivityOverlay 424 268 16 16
|
||||||
nodes/ComputerErrorOverlay 441 268 16 16
|
nodes/ComputerErrorOverlay 441 268 16 16
|
||||||
@ -147,27 +148,27 @@ nodes/OpenFMRadio 407 285 16 16
|
|||||||
nodes/Relay 424 285 16 16
|
nodes/Relay 424 285 16 16
|
||||||
nodes/Screen 441 285 16 16
|
nodes/Screen 441 285 16 16
|
||||||
nodes/ScreenOnOverlay 458 285 16 16
|
nodes/ScreenOnOverlay 458 285 16 16
|
||||||
panel/BorderB 296 402 4 4
|
panel/BorderB 445 349 4 4
|
||||||
panel/BorderL 356 402 4 2
|
panel/BorderL 505 349 4 2
|
||||||
panel/BorderR 301 402 4 4
|
panel/BorderR 450 349 4 4
|
||||||
panel/BorderT 306 402 4 4
|
panel/BorderT 455 349 4 4
|
||||||
panel/CornerBL 311 402 4 4
|
panel/CornerBL 460 349 4 4
|
||||||
panel/CornerBR 316 402 4 4
|
panel/CornerBR 465 349 4 4
|
||||||
panel/CornerTL 321 402 4 4
|
panel/CornerTL 470 349 4 4
|
||||||
panel/CornerTR 326 402 4 4
|
panel/CornerTR 475 349 4 4
|
||||||
panel/Fill 509 123 2 2
|
panel/Fill 505 36 2 2
|
||||||
particles/Note 502 76 7 10
|
particles/Note 502 61 7 10
|
||||||
screen/BorderB 508 40 2 8
|
screen/BorderB 508 25 2 8
|
||||||
screen/BorderT 505 40 2 10
|
screen/BorderT 505 25 2 10
|
||||||
screen/CornerBL 502 114 8 8
|
screen/CornerBL 502 99 8 8
|
||||||
screen/CornerBR 233 402 8 8
|
screen/CornerBR 502 108 8 8
|
||||||
screen/CornerTL 502 54 8 10
|
screen/CornerTL 502 39 8 10
|
||||||
screen/CornerTR 502 65 8 10
|
screen/CornerTR 502 50 8 10
|
||||||
window/BorderDark 502 123 1 4
|
window/BorderDark 509 363 1 4
|
||||||
window/BorderLight 504 123 1 4
|
window/BorderLight 510 117 1 4
|
||||||
window/CloseButton 258 402 7 6
|
window/CloseButton 501 363 7 6
|
||||||
window/CornerBL 331 402 4 4
|
window/CornerBL 480 349 4 4
|
||||||
window/CornerBR 336 402 4 4
|
window/CornerBR 485 349 4 4
|
||||||
window/CornerTL 341 402 4 4
|
window/CornerTL 490 349 4 4
|
||||||
window/CornerTR 346 402 4 4
|
window/CornerTR 495 349 4 4
|
||||||
window/OpenFMRadio 0 305 232 105
|
window/OpenFMRadio 0 305 232 105
|
||||||
|
|||||||
@ -32,7 +32,7 @@ object NodeRegistry {
|
|||||||
|
|
||||||
register(NodeType("Relay", "nodes/Relay", None) { new RelayNode(new Relay) })
|
register(NodeType("Relay", "nodes/Relay", None) { new RelayNode(new Relay) })
|
||||||
register(NodeType("Cable", "nodes/Cable", None) { new CableNode(new Cable) })
|
register(NodeType("Cable", "nodes/Cable", None) { new CableNode(new Cable) })
|
||||||
register(NodeType("Chest", "icons/NA", None) { new ChestNode })
|
register(NodeType("Chest", "nodes/Chest", None) { new ChestNode })
|
||||||
register(NodeType("Note Block", "nodes/NoteBlock", None) { new NoteBlockNode(new NoteBlock) })
|
register(NodeType("Note Block", "nodes/NoteBlock", None) { new NoteBlockNode(new NoteBlock) })
|
||||||
register(NodeType("Iron Note Block", "nodes/IronNoteBlock", None) { new IronNoteBlockNode(new IronNoteBlock) })
|
register(NodeType("Iron Note Block", "nodes/IronNoteBlock", None) { new IronNoteBlockNode(new IronNoteBlock) })
|
||||||
register(NodeType("Camera", "nodes/Camera", None) { new CameraNode(new Camera) })
|
register(NodeType("Camera", "nodes/Camera", None) { new CameraNode(new Camera) })
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package ocelot.desktop.node.nodes
|
package ocelot.desktop.node.nodes
|
||||||
|
|
||||||
|
import ocelot.desktop.geometry.Size2D
|
||||||
import ocelot.desktop.inventory.traits.PersistableItem
|
import ocelot.desktop.inventory.traits.PersistableItem
|
||||||
import ocelot.desktop.inventory.{Item, PersistedInventory}
|
import ocelot.desktop.inventory.{Item, PersistedInventory}
|
||||||
import ocelot.desktop.node.LabeledNode
|
import ocelot.desktop.node.LabeledNode
|
||||||
@ -10,6 +11,10 @@ import totoro.ocelot.brain.nbt.NBTTagCompound
|
|||||||
class ChestNode extends LabeledNode with PersistedInventory {
|
class ChestNode extends LabeledNode with PersistedInventory {
|
||||||
override type I = Item with PersistableItem
|
override type I = Item with PersistableItem
|
||||||
|
|
||||||
|
override def icon: String = "nodes/Chest"
|
||||||
|
|
||||||
|
override def minimumSize: Size2D = Size2D(28, 30) * 2 + 4
|
||||||
|
|
||||||
override def onItemAdded(slot: Slot): Unit = {}
|
override def onItemAdded(slot: Slot): Unit = {}
|
||||||
|
|
||||||
override def onItemRemoved(slot: Slot, removedItem: I, replacedBy: Option[I]): Unit = {}
|
override def onItemRemoved(slot: Slot, removedItem: I, replacedBy: Option[I]): Unit = {}
|
||||||
|
|||||||
@ -153,7 +153,8 @@ class SlotWidget[I <: Item](private val slot: Inventory#Slot)(implicit slotItemT
|
|||||||
case HoverEvent(HoverEvent.State.Enter) => onHoverEnter()
|
case HoverEvent(HoverEvent.State.Enter) => onHoverEnter()
|
||||||
case HoverEvent(HoverEvent.State.Leave) => onHoverLeave()
|
case HoverEvent(HoverEvent.State.Leave) => onHoverLeave()
|
||||||
|
|
||||||
case DragEvent(DragEvent.State.Start, MouseEvent.Button.Left, pos) =>
|
case evt @ DragEvent(DragEvent.State.Start, MouseEvent.Button.Left, _) =>
|
||||||
|
val pos = evt.start
|
||||||
val iconBounds = bounds.inflate(-2)
|
val iconBounds = bounds.inflate(-2)
|
||||||
|
|
||||||
if (iconBounds.contains(pos)) {
|
if (iconBounds.contains(pos)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user