mirror of
https://gitlab.com/cc-ru/ocelot/ocelot-desktop.git
synced 2025-12-20 02:59:19 +01:00
109 lines
3.4 KiB
Scala
109 lines
3.4 KiB
Scala
package ocelot.desktop.graphics
|
|
|
|
import ocelot.desktop.graphics.IconDef.Animation
|
|
import ocelot.desktop.ui.widget.modal.notification.NotificationType.NotificationType
|
|
import totoro.ocelot.brain.util.DyeColor
|
|
import totoro.ocelot.brain.util.ExtendedTier.ExtendedTier
|
|
import totoro.ocelot.brain.util.Tier.Tier
|
|
|
|
object Icons {
|
|
// Icons
|
|
val CardIcon: IconDef = IconDef("icons/Card")
|
|
val CpuIcon: IconDef = IconDef("icons/CPU")
|
|
val HddIcon: IconDef = IconDef("icons/HDD")
|
|
val EepromIcon: IconDef = IconDef("icons/EEPROM")
|
|
val FloppyIcon: IconDef = IconDef("icons/Floppy")
|
|
val MemoryIcon: IconDef = IconDef("icons/Memory")
|
|
val ServerIcon: IconDef = IconDef("icons/Server")
|
|
val ComponentBusIcon: IconDef = IconDef("icons/ComponentBus")
|
|
|
|
val TierIcon: Tier => IconDef = { tier =>
|
|
IconDef(s"icons/Tier${tier.id}")
|
|
}
|
|
|
|
val NotificationIcon: NotificationType => IconDef = { notificationType =>
|
|
IconDef(s"icons/Notification$notificationType", 4)
|
|
}
|
|
|
|
val SettingsSound: IconDef = IconDef("icons/SettingsSound")
|
|
val SettingsUI: IconDef = IconDef("icons/SettingsUI")
|
|
|
|
// Items
|
|
val Cpu: Tier => IconDef = { tier =>
|
|
IconDef(s"items/CPU${tier.id}")
|
|
}
|
|
|
|
val Apu: Tier => IconDef = { tier =>
|
|
IconDef(s"items/APU${tier.id}", animation = Some(Animations.Apu))
|
|
}
|
|
|
|
val GraphicsCard: Tier => IconDef = { tier =>
|
|
IconDef(s"items/GraphicsCard${tier.id}")
|
|
}
|
|
|
|
val NetworkCard: IconDef = IconDef("items/NetworkCard")
|
|
|
|
val WirelessNetworkCard: Tier => IconDef = { tier =>
|
|
IconDef(s"items/WirelessNetworkCard${tier.id}")
|
|
}
|
|
|
|
val LinkedCard: IconDef = IconDef("items/LinkedCard", animation = Some(Animations.LinkedCard))
|
|
|
|
val InternetCard: IconDef = IconDef("items/InternetCard", animation = Some(Animations.InternetCard))
|
|
|
|
val RedstoneCard: Tier => IconDef = { tier =>
|
|
IconDef(s"items/RedstoneCard${tier.id}")
|
|
}
|
|
|
|
val DataCard: Tier => IconDef = { tier =>
|
|
IconDef(s"items/DataCard${tier.id}", animation = Some(Animations.DataCard))
|
|
}
|
|
|
|
val SoundCard: IconDef = IconDef("items/SoundCard", animation = Some(Animations.DataCard))
|
|
|
|
val SelfDestructingCard: IconDef = IconDef("items/SelfDestructingCard", animation = Some(Animations.SelfDestructingCard))
|
|
|
|
val HardDiskDrive: Tier => IconDef = { tier =>
|
|
IconDef(s"items/HardDiskDrive${tier.id}")
|
|
}
|
|
|
|
val Eeprom: IconDef = IconDef("items/EEPROM")
|
|
|
|
val FloppyDisk: DyeColor => IconDef = { color =>
|
|
IconDef(s"items/FloppyDisk_${color.name}")
|
|
}
|
|
|
|
val Memory: ExtendedTier => IconDef = { tier =>
|
|
IconDef(s"items/Memory${tier.id}")
|
|
}
|
|
|
|
val Server: Tier => IconDef = { tier =>
|
|
IconDef(s"items/Server${tier.id}")
|
|
}
|
|
|
|
val ComponentBus: Tier => IconDef = { tier =>
|
|
IconDef(s"items/ComponentBus${tier.id}")
|
|
}
|
|
|
|
val DiskDriveMountable: IconDef = IconDef("items/DiskDriveMountable")
|
|
|
|
//noinspection ScalaWeakerAccess
|
|
object Animations {
|
|
val Apu: Animation = Array(
|
|
(0, 3f), (1, 3f), (2, 3f), (3, 3f), (4, 3f), (5, 3f),
|
|
(4, 3f), (3, 3f), (2, 3f), (1, 3f), (0, 3f))
|
|
|
|
val LinkedCard: Animation =
|
|
Array((0, 3f), (1, 3f), (2, 3f), (3, 3f), (4, 3f), (5, 3f))
|
|
|
|
val InternetCard: Animation = Array(
|
|
(0, 2f), (1, 7f), (0, 5f), (1, 4f), (0, 7f), (1, 2f), (0, 8f),
|
|
(1, 9f), (0, 6f), (1, 4f))
|
|
|
|
val DataCard: Animation = Array(
|
|
(0, 4f), (1, 4f), (2, 4f), (3, 4f), (4, 4f), (5, 4f), (6, 4f), (7, 4f))
|
|
|
|
val SelfDestructingCard: Animation = Array((0, 4f), (1, 4f))
|
|
}
|
|
}
|