Added playback buttons, status bar & custom sounds for TapeDriveWindow, added tape floppy

This commit is contained in:
IgorTimofeev 2023-10-17 03:21:39 +03:00
parent 489850a7da
commit 1bf9c1d60b
19 changed files with 388 additions and 246 deletions

@ -1 +1 @@
Subproject commit 2ef2cf3bda8f05688c9801d859c1ab16088bd4c4 Subproject commit fa3892b7edbced1f6c9db04d14c2c216567909b9

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 KiB

After

Width:  |  Height:  |  Size: 143 KiB

View File

@ -1,175 +1,175 @@
BackgroundPattern 0 0 304 304 BackgroundPattern 0 0 304 304
BarSegment 385 434 16 4 BarSegment 385 434 16 4
Empty 327 572 16 16 Empty 242 674 16 16
EmptySlot 305 597 18 18 EmptySlot 220 699 18 18
Knob 203 434 50 50 Knob 203 434 50 50
KnobCenter 254 434 50 50 KnobCenter 254 434 50 50
KnobLimits 305 434 50 50 KnobLimits 305 434 50 50
Loading 0 305 48 448 Loading 0 305 48 448
Logo 305 0 168 200 Logo 305 0 168 200
ShadowBorder 279 305 1 24 ShadowBorder 279 305 1 24
ShadowCorner 202 572 24 24 ShadowCorner 117 674 24 24
TabArrow 49 716 8 14 TabArrow 134 628 8 14
blocks/Generic 344 572 16 16 blocks/Generic 259 674 16 16
blocks/HologramEffect 287 314 4 4 blocks/HologramEffect 287 314 4 4
blocks/HologramProjector1Top 361 572 16 16 blocks/HologramProjector1Top 276 674 16 16
blocks/HologramProjector2Top 378 572 16 16 blocks/HologramProjector2Top 293 674 16 16
blocks/HologramProjectorSide 395 572 16 16 blocks/HologramProjectorSide 310 674 16 16
buttons/BottomDrawerClose 324 597 18 18 buttons/BottomDrawerClose 239 699 18 18
buttons/BottomDrawerOpen 343 597 18 18 buttons/BottomDrawerOpen 258 699 18 18
buttons/OpenFMRadioCloseOff 404 445 7 8 buttons/OpenFMRadioCloseOff 404 445 7 8
buttons/OpenFMRadioCloseOn 412 445 7 8 buttons/OpenFMRadioCloseOn 412 445 7 8
buttons/OpenFMRadioRedstoneOff 359 445 8 8 buttons/OpenFMRadioRedstoneOff 359 445 8 8
buttons/OpenFMRadioRedstoneOn 368 445 8 8 buttons/OpenFMRadioRedstoneOn 368 445 8 8
buttons/OpenFMRadioStartOff 227 572 24 24 buttons/OpenFMRadioStartOff 142 674 24 24
buttons/OpenFMRadioStartOn 252 572 24 24 buttons/OpenFMRadioStartOn 167 674 24 24
buttons/OpenFMRadioStopOff 277 572 24 24 buttons/OpenFMRadioStopOff 192 674 24 24
buttons/OpenFMRadioStopOn 302 572 24 24 buttons/OpenFMRadioStopOn 217 674 24 24
buttons/OpenFMRadioVolumeDownOff 58 716 10 10 buttons/OpenFMRadioVolumeDownOff 143 628 10 10
buttons/OpenFMRadioVolumeDownOn 69 716 10 10 buttons/OpenFMRadioVolumeDownOn 154 628 10 10
buttons/OpenFMRadioVolumeUpOff 80 716 10 10 buttons/OpenFMRadioVolumeUpOff 165 628 10 10
buttons/OpenFMRadioVolumeUpOn 91 716 10 10 buttons/OpenFMRadioVolumeUpOn 176 628 10 10
buttons/PowerOff 362 597 18 18 buttons/PowerOff 277 699 18 18
buttons/PowerOn 381 597 18 18 buttons/PowerOn 296 699 18 18
buttons/RackRelayOff 202 553 65 18 buttons/RackRelayOff 117 655 65 18
buttons/RackRelayOn 268 553 65 18 buttons/RackRelayOn 183 655 65 18
icons/Antenna 412 572 16 16 icons/Antenna 327 674 16 16
icons/ArrowRight 429 572 16 16 icons/ArrowRight 344 674 16 16
icons/AspectRatio 446 572 16 16 icons/AspectRatio 361 674 16 16
icons/Book 463 572 16 16 icons/Book 378 674 16 16
icons/ButtonCheck 202 630 17 17 icons/ButtonCheck 117 732 17 17
icons/ButtonClipboard 220 630 17 17 icons/ButtonClipboard 135 732 17 17
icons/ButtonRandomize 238 630 17 17 icons/ButtonRandomize 153 732 17 17
icons/CPU 480 572 16 16 icons/CPU 395 674 16 16
icons/Card 497 572 16 16 icons/Card 412 674 16 16
icons/Close 49 683 15 14 icons/Close 134 595 15 14
icons/Code 514 572 16 16 icons/Code 429 674 16 16
icons/ComponentBus 531 572 16 16 icons/ComponentBus 446 674 16 16
icons/Copy 548 572 16 16 icons/Copy 463 674 16 16
icons/Cross 565 572 16 16 icons/Cross 480 674 16 16
icons/Delete 582 572 16 16 icons/Delete 497 674 16 16
icons/DragLMB 400 597 21 14 icons/DragLMB 483 699 21 14
icons/DragRMB 422 597 21 14 icons/DragRMB 505 699 21 14
icons/EEPROM 599 572 16 16 icons/EEPROM 514 674 16 16
icons/Edit 616 572 16 16 icons/Edit 531 674 16 16
icons/Eject 633 572 16 16 icons/Eject 548 674 16 16
icons/File 650 572 16 16 icons/File 565 674 16 16
icons/Floppy 667 572 16 16 icons/Floppy 582 674 16 16
icons/Folder 684 572 16 16 icons/Folder 599 674 16 16
icons/FolderSlash 701 572 16 16 icons/FolderSlash 616 674 16 16
icons/Grid 236 597 22 22 icons/Grid 151 699 22 22
icons/GridOff 259 597 22 22 icons/GridOff 174 699 22 22
icons/HDD 718 572 16 16 icons/HDD 633 674 16 16
icons/Help 735 572 16 16 icons/Help 650 674 16 16
icons/Home 282 597 22 22 icons/Home 197 699 22 22
icons/LMB 133 698 11 14 icons/LMB 218 610 11 14
icons/Label 752 572 16 16 icons/Label 667 674 16 16
icons/LinesHorizontal 769 572 16 16 icons/LinesHorizontal 684 674 16 16
icons/Link 786 572 16 16 icons/Link 701 674 16 16
icons/LinkSlash 803 572 16 16 icons/LinkSlash 718 674 16 16
icons/Memory 820 572 16 16 icons/Memory 735 674 16 16
icons/Microchip 837 572 16 16 icons/Microchip 752 674 16 16
icons/NA 854 572 16 16 icons/NA 769 674 16 16
icons/NotificationError 157 698 11 11 icons/NotificationError 242 610 11 11
icons/NotificationInfo 169 698 11 11 icons/NotificationInfo 254 610 11 11
icons/NotificationWarning 181 698 11 11 icons/NotificationWarning 266 610 11 11
icons/Ocelot 871 572 16 16 icons/Ocelot 786 674 16 16
icons/Pin 88 698 14 14 icons/Pin 173 610 14 14
icons/Plus 888 572 16 16 icons/Plus 803 674 16 16
icons/Power 905 572 16 16 icons/Power 820 674 16 16
icons/RMB 145 698 11 14 icons/RMB 230 610 11 14
icons/Restart 922 572 16 16 icons/Restart 837 674 16 16
icons/Save 939 572 16 16 icons/Save 854 674 16 16
icons/SaveAs 956 572 16 16 icons/SaveAs 871 674 16 16
icons/Server 973 572 16 16 icons/Server 888 674 16 16
icons/SettingsSound 49 698 12 17 icons/SettingsSound 134 610 12 17
icons/SettingsSystem 62 698 12 17 icons/SettingsSystem 147 610 12 17
icons/SettingsUI 75 698 12 17 icons/SettingsUI 160 610 12 17
icons/Tier0 990 572 16 16 icons/Tier0 905 674 16 16
icons/Tier1 1007 572 16 16 icons/Tier1 922 674 16 16
icons/Tier2 334 553 16 16 icons/Tier2 939 674 16 16
icons/Tiers 351 553 16 16 icons/Tiers 956 674 16 16
icons/Unpin 103 698 14 14 icons/Unpin 188 610 14 14
icons/WaveLFSR 969 655 24 10 icons/WaveLFSR 884 567 24 10
icons/WaveNoise 994 655 24 10 icons/WaveNoise 909 567 24 10
icons/WaveSawtooth 49 672 24 10 icons/WaveSawtooth 934 567 24 10
icons/WaveSine 74 672 24 10 icons/WaveSine 959 567 24 10
icons/WaveSquare 99 672 24 10 icons/WaveSquare 984 567 24 10
icons/WaveTriangle 124 672 24 10 icons/WaveTriangle 134 584 24 10
icons/Window 368 553 16 16 icons/Window 973 674 16 16
icons/WireArrowLeft 281 305 4 8 icons/WireArrowLeft 281 305 4 8
icons/WireArrowRight 286 305 4 8 icons/WireArrowRight 286 305 4 8
items/APU0 134 553 16 96 items/APU0 49 655 16 96
items/APU1 151 553 16 96 items/APU1 66 655 16 96
items/APU2 168 553 16 96 items/APU2 83 655 16 96
items/CPU0 385 553 16 16 items/CPU0 990 674 16 16
items/CPU1 402 553 16 16 items/CPU1 1007 674 16 16
items/CPU2 419 553 16 16 items/CPU2 249 655 16 16
items/CardBase 436 553 16 16 items/CardBase 266 655 16 16
items/CircuitBoard 453 553 16 16 items/CircuitBoard 283 655 16 16
items/ComponentBus0 470 553 16 16 items/ComponentBus0 300 655 16 16
items/ComponentBus1 487 553 16 16 items/ComponentBus1 317 655 16 16
items/ComponentBus2 504 553 16 16 items/ComponentBus2 334 655 16 16
items/ComponentBus3 521 553 16 16 items/ComponentBus3 351 655 16 16
items/DataCard0 49 526 16 128 items/DataCard0 49 526 16 128
items/DataCard1 66 526 16 128 items/DataCard1 66 526 16 128
items/DataCard2 83 526 16 128 items/DataCard2 83 526 16 128
items/DebugCard 538 553 16 16 items/DebugCard 368 655 16 16
items/DiskDriveMountable 555 553 16 16 items/DiskDriveMountable 385 655 16 16
items/EEPROM 572 553 16 16 items/EEPROM 402 655 16 16
items/FloppyDisk_dyeBlack 589 553 16 16 items/FloppyDisk_dyeBlack 419 655 16 16
items/FloppyDisk_dyeBlue 606 553 16 16 items/FloppyDisk_dyeBlue 436 655 16 16
items/FloppyDisk_dyeBrown 623 553 16 16 items/FloppyDisk_dyeBrown 453 655 16 16
items/FloppyDisk_dyeCyan 640 553 16 16 items/FloppyDisk_dyeCyan 470 655 16 16
items/FloppyDisk_dyeGray 657 553 16 16 items/FloppyDisk_dyeGray 487 655 16 16
items/FloppyDisk_dyeGreen 674 553 16 16 items/FloppyDisk_dyeGreen 504 655 16 16
items/FloppyDisk_dyeLightBlue 691 553 16 16 items/FloppyDisk_dyeLightBlue 521 655 16 16
items/FloppyDisk_dyeLightGray 708 553 16 16 items/FloppyDisk_dyeLightGray 538 655 16 16
items/FloppyDisk_dyeLime 725 553 16 16 items/FloppyDisk_dyeLime 555 655 16 16
items/FloppyDisk_dyeMagenta 742 553 16 16 items/FloppyDisk_dyeMagenta 572 655 16 16
items/FloppyDisk_dyeOrange 759 553 16 16 items/FloppyDisk_dyeOrange 589 655 16 16
items/FloppyDisk_dyePink 776 553 16 16 items/FloppyDisk_dyePink 606 655 16 16
items/FloppyDisk_dyePurple 793 553 16 16 items/FloppyDisk_dyePurple 623 655 16 16
items/FloppyDisk_dyeRed 810 553 16 16 items/FloppyDisk_dyeRed 640 655 16 16
items/FloppyDisk_dyeWhite 827 553 16 16 items/FloppyDisk_dyeWhite 657 655 16 16
items/FloppyDisk_dyeYellow 844 553 16 16 items/FloppyDisk_dyeYellow 674 655 16 16
items/GraphicsCard0 861 553 16 16 items/GraphicsCard0 691 655 16 16
items/GraphicsCard1 878 553 16 16 items/GraphicsCard1 708 655 16 16
items/GraphicsCard2 895 553 16 16 items/GraphicsCard2 725 655 16 16
items/HardDiskDrive0 912 553 16 16 items/HardDiskDrive0 742 655 16 16
items/HardDiskDrive1 929 553 16 16 items/HardDiskDrive1 759 655 16 16
items/HardDiskDrive2 946 553 16 16 items/HardDiskDrive2 776 655 16 16
items/InternetCard 202 597 16 32 items/InternetCard 117 699 16 32
items/LinkedCard 185 553 16 96 items/LinkedCard 100 655 16 96
items/Memory0 963 553 16 16 items/Memory0 793 655 16 16
items/Memory1 980 553 16 16 items/Memory1 810 655 16 16
items/Memory2 997 553 16 16 items/Memory2 827 655 16 16
items/Memory3 201 526 16 16 items/Memory3 844 655 16 16
items/Memory4 218 526 16 16 items/Memory4 861 655 16 16
items/Memory5 235 526 16 16 items/Memory5 878 655 16 16
items/Memory6 252 526 16 16 items/Memory6 895 655 16 16
items/NetworkCard 269 526 16 16 items/NetworkCard 912 655 16 16
items/OcelotCard 100 526 16 128 items/OcelotCard 100 526 16 128
items/RedstoneCard0 286 526 16 16 items/RedstoneCard0 929 655 16 16
items/RedstoneCard1 303 526 16 16 items/RedstoneCard1 946 655 16 16
items/SelfDestructingCard 219 597 16 32 items/SelfDestructingCard 134 699 16 32
items/Server0 320 526 16 16 items/Server0 963 655 16 16
items/Server1 337 526 16 16 items/Server1 980 655 16 16
items/Server2 354 526 16 16 items/Server2 997 655 16 16
items/Server3 371 526 16 16 items/Server3 201 540 16 16
items/SoundCard 117 526 16 128 items/SoundCard 117 526 16 128
items/TapeCopper 388 526 16 16 items/TapeCopper 218 540 16 16
items/TapeDiamond 405 526 16 16 items/TapeDiamond 235 540 16 16
items/TapeGold 422 526 16 16 items/TapeGold 252 540 16 16
items/TapeGreg 439 526 16 16 items/TapeGreg 269 540 16 16
items/TapeIg 456 526 16 16 items/TapeIg 286 540 16 16
items/TapeIron 473 526 16 16 items/TapeIron 303 540 16 16
items/TapeNetherStar 490 526 16 16 items/TapeNetherStar 320 540 16 16
items/TapeSteel 507 526 16 16 items/TapeSteel 337 540 16 16
items/WirelessNetworkCard0 524 526 16 16 items/WirelessNetworkCard0 354 540 16 16
items/WirelessNetworkCard1 541 526 16 16 items/WirelessNetworkCard1 371 540 16 16
light-panel/BookmarkLeft 950 655 18 14 light-panel/BookmarkLeft 865 567 18 14
light-panel/BookmarkRight 256 630 20 14 light-panel/BookmarkRight 171 732 20 14
light-panel/BorderB 292 314 4 4 light-panel/BorderB 292 314 4 4
light-panel/BorderL 382 314 4 2 light-panel/BorderL 382 314 4 2
light-panel/BorderR 297 314 4 4 light-panel/BorderR 297 314 4 4
@ -181,88 +181,88 @@ light-panel/CornerTR 322 314 4 4
light-panel/Fill 285 325 2 2 light-panel/Fill 285 325 2 2
light-panel/Vent 356 434 2 38 light-panel/Vent 356 434 2 38
nodes/Cable 377 445 8 8 nodes/Cable 377 445 8 8
nodes/Camera 558 526 16 16 nodes/Camera 388 540 16 16
nodes/Chest 118 698 14 14 nodes/Chest 203 610 14 14
nodes/HologramProjector0 575 526 16 16 nodes/HologramProjector0 405 540 16 16
nodes/HologramProjector1 592 526 16 16 nodes/HologramProjector1 422 540 16 16
nodes/IronNoteBlock 609 526 16 16 nodes/IronNoteBlock 439 540 16 16
nodes/Lamp 626 526 16 16 nodes/Lamp 456 540 16 16
nodes/LampFrame 643 526 16 16 nodes/LampFrame 473 540 16 16
nodes/LampGlow 49 305 128 128 nodes/LampGlow 49 305 128 128
nodes/NewNode 660 526 16 16 nodes/NewNode 490 540 16 16
nodes/NoteBlock 677 526 16 16 nodes/NoteBlock 507 540 16 16
nodes/OpenFMRadio 694 526 16 16 nodes/OpenFMRadio 524 540 16 16
nodes/Relay 711 526 16 16 nodes/Relay 541 540 16 16
nodes/TapeDrive 728 526 16 16 nodes/TapeDrive 558 540 16 16
nodes/computer/Default 745 526 16 16 nodes/computer/Default 575 540 16 16
nodes/computer/DiskActivity 762 526 16 16 nodes/computer/DiskActivity 592 540 16 16
nodes/computer/Error 779 526 16 16 nodes/computer/Error 609 540 16 16
nodes/computer/On 796 526 16 16 nodes/computer/On 626 540 16 16
nodes/disk-drive/Default 813 526 16 16 nodes/disk-drive/Default 643 540 16 16
nodes/disk-drive/DiskActivity 830 526 16 16 nodes/disk-drive/DiskActivity 660 540 16 16
nodes/disk-drive/Floppy 847 526 16 16 nodes/disk-drive/Floppy 677 540 16 16
nodes/microcontroller/Default 864 526 16 16 nodes/microcontroller/Default 694 540 16 16
nodes/microcontroller/Error 881 526 16 16 nodes/microcontroller/Error 711 540 16 16
nodes/microcontroller/On 898 526 16 16 nodes/microcontroller/On 728 540 16 16
nodes/rack/Default 915 526 16 16 nodes/rack/Default 745 540 16 16
nodes/rack/Empty 932 526 16 16 nodes/rack/Empty 762 540 16 16
nodes/rack/drive/0/Default 949 526 16 16 nodes/rack/drive/0/Default 779 540 16 16
nodes/rack/drive/0/DiskActivity 966 526 16 16 nodes/rack/drive/0/DiskActivity 796 540 16 16
nodes/rack/drive/0/Floppy 983 526 16 16 nodes/rack/drive/0/Floppy 813 540 16 16
nodes/rack/drive/1/Default 1000 526 16 16 nodes/rack/drive/1/Default 830 540 16 16
nodes/rack/drive/1/DiskActivity 49 655 16 16 nodes/rack/drive/1/DiskActivity 847 540 16 16
nodes/rack/drive/1/Floppy 66 655 16 16 nodes/rack/drive/1/Floppy 864 540 16 16
nodes/rack/drive/2/Default 83 655 16 16 nodes/rack/drive/2/Default 881 540 16 16
nodes/rack/drive/2/DiskActivity 100 655 16 16 nodes/rack/drive/2/DiskActivity 898 540 16 16
nodes/rack/drive/2/Floppy 117 655 16 16 nodes/rack/drive/2/Floppy 915 540 16 16
nodes/rack/drive/3/Default 134 655 16 16 nodes/rack/drive/3/Default 932 540 16 16
nodes/rack/drive/3/DiskActivity 151 655 16 16 nodes/rack/drive/3/DiskActivity 949 540 16 16
nodes/rack/drive/3/Floppy 168 655 16 16 nodes/rack/drive/3/Floppy 966 540 16 16
nodes/rack/drive/Floppy 185 655 16 16 nodes/rack/drive/Floppy 983 540 16 16
nodes/rack/server/0/Default 202 655 16 16 nodes/rack/server/0/Default 1000 540 16 16
nodes/rack/server/0/DiskActivity 219 655 16 16 nodes/rack/server/0/DiskActivity 134 567 16 16
nodes/rack/server/0/Error 236 655 16 16 nodes/rack/server/0/Error 151 567 16 16
nodes/rack/server/0/NetworkActivity 253 655 16 16 nodes/rack/server/0/NetworkActivity 168 567 16 16
nodes/rack/server/0/On 270 655 16 16 nodes/rack/server/0/On 185 567 16 16
nodes/rack/server/1/Default 287 655 16 16 nodes/rack/server/1/Default 202 567 16 16
nodes/rack/server/1/DiskActivity 304 655 16 16 nodes/rack/server/1/DiskActivity 219 567 16 16
nodes/rack/server/1/Error 321 655 16 16 nodes/rack/server/1/Error 236 567 16 16
nodes/rack/server/1/NetworkActivity 338 655 16 16 nodes/rack/server/1/NetworkActivity 253 567 16 16
nodes/rack/server/1/On 355 655 16 16 nodes/rack/server/1/On 270 567 16 16
nodes/rack/server/2/Default 372 655 16 16 nodes/rack/server/2/Default 287 567 16 16
nodes/rack/server/2/DiskActivity 389 655 16 16 nodes/rack/server/2/DiskActivity 304 567 16 16
nodes/rack/server/2/Error 406 655 16 16 nodes/rack/server/2/Error 321 567 16 16
nodes/rack/server/2/NetworkActivity 423 655 16 16 nodes/rack/server/2/NetworkActivity 338 567 16 16
nodes/rack/server/2/On 440 655 16 16 nodes/rack/server/2/On 355 567 16 16
nodes/rack/server/3/Default 457 655 16 16 nodes/rack/server/3/Default 372 567 16 16
nodes/rack/server/3/DiskActivity 474 655 16 16 nodes/rack/server/3/DiskActivity 389 567 16 16
nodes/rack/server/3/Error 491 655 16 16 nodes/rack/server/3/Error 406 567 16 16
nodes/rack/server/3/NetworkActivity 508 655 16 16 nodes/rack/server/3/NetworkActivity 423 567 16 16
nodes/rack/server/3/On 525 655 16 16 nodes/rack/server/3/On 440 567 16 16
nodes/raid/0/DiskActivity 542 655 16 16 nodes/raid/0/DiskActivity 457 567 16 16
nodes/raid/0/Error 559 655 16 16 nodes/raid/0/Error 474 567 16 16
nodes/raid/1/DiskActivity 576 655 16 16 nodes/raid/1/DiskActivity 491 567 16 16
nodes/raid/1/Error 593 655 16 16 nodes/raid/1/Error 508 567 16 16
nodes/raid/2/DiskActivity 610 655 16 16 nodes/raid/2/DiskActivity 525 567 16 16
nodes/raid/2/Error 627 655 16 16 nodes/raid/2/Error 542 567 16 16
nodes/raid/Default 644 655 16 16 nodes/raid/Default 559 567 16 16
nodes/screen/BottomLeft 661 655 16 16 nodes/screen/BottomLeft 576 567 16 16
nodes/screen/BottomMiddle 678 655 16 16 nodes/screen/BottomMiddle 593 567 16 16
nodes/screen/BottomRight 695 655 16 16 nodes/screen/BottomRight 610 567 16 16
nodes/screen/ColumnBottom 712 655 16 16 nodes/screen/ColumnBottom 627 567 16 16
nodes/screen/ColumnMiddle 729 655 16 16 nodes/screen/ColumnMiddle 644 567 16 16
nodes/screen/ColumnTop 746 655 16 16 nodes/screen/ColumnTop 661 567 16 16
nodes/screen/Middle 763 655 16 16 nodes/screen/Middle 678 567 16 16
nodes/screen/MiddleLeft 780 655 16 16 nodes/screen/MiddleLeft 695 567 16 16
nodes/screen/MiddleRight 797 655 16 16 nodes/screen/MiddleRight 712 567 16 16
nodes/screen/PowerOnOverlay 814 655 16 16 nodes/screen/PowerOnOverlay 729 567 16 16
nodes/screen/RowLeft 831 655 16 16 nodes/screen/RowLeft 746 567 16 16
nodes/screen/RowMiddle 848 655 16 16 nodes/screen/RowMiddle 763 567 16 16
nodes/screen/RowRight 865 655 16 16 nodes/screen/RowRight 780 567 16 16
nodes/screen/Standalone 882 655 16 16 nodes/screen/Standalone 797 567 16 16
nodes/screen/TopLeft 899 655 16 16 nodes/screen/TopLeft 814 567 16 16
nodes/screen/TopMiddle 916 655 16 16 nodes/screen/TopMiddle 831 567 16 16
nodes/screen/TopRight 933 655 16 16 nodes/screen/TopRight 848 567 16 16
panel/BorderB 327 314 4 4 panel/BorderB 327 314 4 4
panel/BorderL 387 314 4 2 panel/BorderL 387 314 4 2
panel/BorderR 332 314 4 4 panel/BorderR 332 314 4 4
@ -306,4 +306,13 @@ window/rack/SideConnector 291 319 1 3
window/rack/SideLeft 293 319 1 3 window/rack/SideLeft 293 319 1 3
window/rack/SideRight 295 319 1 3 window/rack/SideRight 295 319 1 3
window/rack/SideTop 297 319 1 3 window/rack/SideTop 297 319 1 3
window/raid/Slots 134 526 66 26 window/raid/Slots 134 540 66 26
window/tape/Back 315 699 20 15
window/tape/BackPressed 336 699 20 15
window/tape/Forward 357 699 20 15
window/tape/ForwardPressed 378 699 20 15
window/tape/Play 399 699 20 15
window/tape/PlayPressed 420 699 20 15
window/tape/Screen 134 526 146 13
window/tape/Stop 441 699 20 15
window/tape/StopPressed 462 699 20 15

View File

@ -24,8 +24,15 @@ object SoundBuffers extends Resource {
load("/ocelot/desktop/sounds/machine/hdd_access5.ogg"), load("/ocelot/desktop/sounds/machine/hdd_access5.ogg"),
load("/ocelot/desktop/sounds/machine/hdd_access6.ogg"), load("/ocelot/desktop/sounds/machine/hdd_access6.ogg"),
) )
lazy val MachineTapeButton: SoundBuffer = load("/ocelot/desktop/sounds/machine/tape_button.ogg")
lazy val MachineTapeEject: SoundBuffer = load("/ocelot/desktop/sounds/machine/tape_eject.ogg")
lazy val MachineTapeInsert: SoundBuffer = load("/ocelot/desktop/sounds/machine/tape_insert.ogg")
lazy val MachineTapeRewind: SoundBuffer = load("/ocelot/desktop/sounds/machine/tape_rewind.ogg")
lazy val InterfaceClick: SoundBuffer = load("/ocelot/desktop/sounds/interface/click.ogg") lazy val InterfaceClick: SoundBuffer = load("/ocelot/desktop/sounds/interface/click.ogg")
lazy val InterfaceTick: SoundBuffer = load("/ocelot/desktop/sounds/interface/tick.ogg") lazy val InterfaceTick: SoundBuffer = load("/ocelot/desktop/sounds/interface/tick.ogg")
lazy val MinecraftClick: SoundBuffer = load("/ocelot/desktop/sounds/minecraft/click.ogg") lazy val MinecraftClick: SoundBuffer = load("/ocelot/desktop/sounds/minecraft/click.ogg")
lazy val MinecraftExplosion: SoundBuffer = load("/ocelot/desktop/sounds/minecraft/explosion.ogg") lazy val MinecraftExplosion: SoundBuffer = load("/ocelot/desktop/sounds/minecraft/explosion.ogg")

View File

@ -1,22 +1,47 @@
package ocelot.desktop.node.nodes package ocelot.desktop.node.nodes
import ocelot.desktop.audio.{Audio, SoundBuffers, SoundCategory, SoundSource}
import ocelot.desktop.inventory.SyncedInventory import ocelot.desktop.inventory.SyncedInventory
import ocelot.desktop.inventory.item.TapeItem import ocelot.desktop.inventory.item.TapeItem
import ocelot.desktop.node.{EntityNode, LabeledEntityNode, WindowedNode} import ocelot.desktop.node.{EntityNode, LabeledEntityNode, WindowedNode}
import ocelot.desktop.windows.TapeDriveWindow import ocelot.desktop.windows.TapeDriveWindow
import totoro.ocelot.brain.entity.TapeDrive import totoro.ocelot.brain.entity.{TapeDrive, TapeDriveState}
class TapeDriveNode(entity: TapeDrive) class TapeDriveNode(val tapeDrive: TapeDrive)
extends EntityNode(entity) extends EntityNode(tapeDrive)
with SyncedInventory with SyncedInventory
with LabeledEntityNode with LabeledEntityNode
with WindowedNode[TapeDriveWindow] { with WindowedNode[TapeDriveWindow] {
override def icon: String = "nodes/TapeDrive" override def icon: String = "nodes/TapeDrive"
private lazy val soundTapeRewind: SoundSource = SoundSource.fromBuffer(
SoundBuffers.MachineTapeRewind,
SoundCategory.Environment,
looping = true
)
override def update(): Unit = {
super.update()
val isRewinding = tapeDrive.state.state == TapeDriveState.State.Rewinding || tapeDrive.state.state == TapeDriveState.State.Forwarding
if (!isRewinding && soundTapeRewind.isPlaying) {
soundTapeRewind.stop()
}
else if (isRewinding && !soundTapeRewind.isPlaying && !Audio.isDisabled) {
soundTapeRewind.play()
}
}
// -------------------------------- Inventory --------------------------------
override type I = TapeItem override type I = TapeItem
override def brainInventory: TapeDrive = entity override def brainInventory: TapeDrive = tapeDrive
// -------------------------------- Windowed --------------------------------
override protected def createWindow(): TapeDriveWindow = new TapeDriveWindow(this) override protected def createWindow(): TapeDriveWindow = new TapeDriveWindow(this)
} }

View File

@ -1,19 +1,120 @@
package ocelot.desktop.windows package ocelot.desktop.windows
import ocelot.desktop.geometry.Padding2D import ocelot.desktop.audio.{SoundBuffers, SoundCategory, SoundSource}
import ocelot.desktop.color.{Color, RGBAColorNorm}
import ocelot.desktop.geometry.{Padding2D, Size2D}
import ocelot.desktop.graphics.Graphics
import ocelot.desktop.inventory.item.TapeItem import ocelot.desktop.inventory.item.TapeItem
import ocelot.desktop.node.nodes.TapeDriveNode import ocelot.desktop.node.nodes.TapeDriveNode
import ocelot.desktop.ui.widget.PaddingBox import ocelot.desktop.ui.layout.{AlignItems, Layout, LinearLayout}
import ocelot.desktop.ui.widget.slot.SlotWidget import ocelot.desktop.ui.widget.slot.SlotWidget
import ocelot.desktop.ui.widget.window.PanelWindow import ocelot.desktop.ui.widget.window.PanelWindow
import ocelot.desktop.ui.widget.{IconButton, PaddingBox, Widget}
import ocelot.desktop.util.Orientation
import totoro.ocelot.brain.entity.TapeDriveState
class TapeDriveWindow(host: TapeDriveNode) extends PanelWindow { class TapeDriveWindow(val tapeDriveNode: TapeDriveNode) extends PanelWindow {
override protected def title: String = s"Tape Drive ${host.entity.node.address}" private val playbackOverlayColor: RGBAColorNorm = RGBAColorNorm(1, 1, 1, 0.01f)
override def titleMaxLength: Int = 16 private lazy val tapeButtonSound: SoundSource = SoundSource.fromBuffer(SoundBuffers.MachineTapeButton, SoundCategory.Environment)
override protected def title: String = s"Tape Drive ${tapeDriveNode.tapeDrive.node.address}"
override def titleMaxLength: Int = 22
setInner(new PaddingBox( setInner(new PaddingBox(
new SlotWidget[TapeItem](host.Slot(0)), new Widget {
Padding2D(8, 64, 8, 64) override protected val layout: Layout = new LinearLayout(this, orientation = Orientation.Vertical, gap = 16, alignItems = AlignItems.Center)
// Screen
children :+= new Widget {
override def minimumSize: Size2D = Size2D(292, 26)
override def maximumSize: Size2D = minimumSize
override def draw(g: Graphics): Unit = {
// Screen background
g.sprite(
"window/tape/Screen",
bounds
)
// A barely noticeable overlay showing the playback progress
// Btw computronix doesn't have this feature, so I won't ruin the canon and make it too annoying
val playedPart = tapeDriveNode.tapeDrive.position.toFloat / tapeDriveNode.tapeDrive.size.toFloat
if (playedPart > 0) {
val offset = 2
g.rect(
position.x + offset,
position.y + offset,
(width - offset * 2) * playedPart,
height - offset * 2,
playbackOverlayColor
)
}
// Tape label name
val label = tapeDriveNode.tapeDrive.tape.map(_.label)
val text = if (label.isDefined && label.get.nonEmpty) label.get else "Unnamed tape"
val textWidth = text.map(g.font.charWidth(_)).sum
val textHeight = 16
g.background = Color.Transparent
g.foreground = Color.White
g.text(position.x + width / 2 - textWidth / 2, position.y + height / 2 - textHeight / 2, text)
}
}
// Slot
children :+= new SlotWidget[TapeItem](tapeDriveNode.Slot(0))
// Buttons
children :+= new Widget {
override protected val layout: Layout = new LinearLayout(this, gap = 0)
def addButton(sprite: String, pressedState: TapeDriveState.State): Unit = {
children :+= new IconButton(
s"window/tape/$sprite",
s"window/tape/${sprite}Pressed",
mode = IconButton.Mode.Switch,
sizeMultiplier = 2,
model = IconButton.ReadOnlyModel(tapeDriveNode.tapeDrive.state.state == pressedState),
) {
override def onPressed(): Unit = tapeDriveNode.tapeDrive.state.state = pressedState
protected override def clickSoundSource: SoundSource = tapeButtonSound
override def update(): Unit = {
model.pressed = tapeDriveNode.tapeDrive.state.state == pressedState
super.update()
}
}
}
addButton(
"Back",
TapeDriveState.State.Rewinding
)
addButton(
"Play",
TapeDriveState.State.Playing
)
addButton(
"Stop",
TapeDriveState.State.Stopped
)
addButton(
"Forward",
TapeDriveState.State.Forwarding
)
}
},
Padding2D(10, 20, 10, 20)
)) ))
} }