Split widgets_18 to several files
This commit is contained in:
parent
b551044867
commit
6390857959
@ -4,7 +4,10 @@ import net.minecraft.resources.ResourceLocation
|
|||||||
import ru.dbotthepony.mc.otm.OverdriveThatMatters
|
import ru.dbotthepony.mc.otm.OverdriveThatMatters
|
||||||
|
|
||||||
object WidgetLocation {
|
object WidgetLocation {
|
||||||
val WIDGETS_18 = ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets_18.png")
|
val LARGE_BUTTON = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/large_button.png"), 72f, 18f)
|
||||||
|
val STORAGE_CONTROLS = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/storage_controls.png"), 90f, 18f)
|
||||||
|
val MISC_18 = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/misc_18.png"), 72f, 72f)
|
||||||
|
val SLOT_BACKGROUNDS = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/slot_backgrounds.png"), 72f, 72f)
|
||||||
|
|
||||||
val MISC = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/misc.png"), 64f, 64f)
|
val MISC = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/misc.png"), 64f, 64f)
|
||||||
val PATTERN_PANEL_TABS = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/pattern_panel_tabs.png"), 60f, 23f)
|
val PATTERN_PANEL_TABS = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/pattern_panel_tabs.png"), 60f, 23f)
|
||||||
|
@ -5,47 +5,50 @@ private fun makeButton(grid: GridAtlas): StretchingRectangleElement {
|
|||||||
val y = grid.currentY
|
val y = grid.currentY
|
||||||
|
|
||||||
return StretchingRectangleElement(
|
return StretchingRectangleElement(
|
||||||
topLeft = WidgetLocation.WIDGETS_18.sprite(x, y, 2f, 2f, grid.atlasWidth, grid.atlasHeight),
|
topLeft = grid.texture.sprite(x, y, 2f, 2f, grid.atlasWidth, grid.atlasHeight),
|
||||||
topRight = WidgetLocation.WIDGETS_18.sprite(x + 16f, y, 2f, 2f, grid.atlasWidth, grid.atlasHeight),
|
topRight = grid.texture.sprite(x + 16f, y, 2f, 2f, grid.atlasWidth, grid.atlasHeight),
|
||||||
bottomLeft = WidgetLocation.WIDGETS_18.sprite(x, y + 16f, 2f, 2f, grid.atlasWidth, grid.atlasHeight),
|
bottomLeft = grid.texture.sprite(x, y + 16f, 2f, 2f, grid.atlasWidth, grid.atlasHeight),
|
||||||
bottomRight = WidgetLocation.WIDGETS_18.sprite(x + 16f, y + 16f, 2f, 2f, grid.atlasWidth, grid.atlasHeight),
|
bottomRight = grid.texture.sprite(x + 16f, y + 16f, 2f, 2f, grid.atlasWidth, grid.atlasHeight),
|
||||||
middle = WidgetLocation.WIDGETS_18.sprite(x + 2f, y + 2f, 14f, 14f, grid.atlasWidth, grid.atlasHeight),
|
middle = grid.texture.sprite(x + 2f, y + 2f, 14f, 14f, grid.atlasWidth, grid.atlasHeight),
|
||||||
top = WidgetLocation.WIDGETS_18.sprite(x + 2f, y, 14f, 2f, grid.atlasWidth, grid.atlasHeight),
|
top = grid.texture.sprite(x + 2f, y, 14f, 2f, grid.atlasWidth, grid.atlasHeight),
|
||||||
left = WidgetLocation.WIDGETS_18.sprite(x, y + 2f, 2f, 14f, grid.atlasWidth, grid.atlasHeight),
|
left = grid.texture.sprite(x, y + 2f, 2f, 14f, grid.atlasWidth, grid.atlasHeight),
|
||||||
right = WidgetLocation.WIDGETS_18.sprite(x + 16f, y + 2f, 2f, 14f, grid.atlasWidth, grid.atlasHeight),
|
right = grid.texture.sprite(x + 16f, y + 2f, 2f, 14f, grid.atlasWidth, grid.atlasHeight),
|
||||||
bottom = WidgetLocation.WIDGETS_18.sprite(x + 2f, y + 16f, 14f, 2f, grid.atlasWidth, grid.atlasHeight),
|
bottom = grid.texture.sprite(x + 2f, y + 16f, 14f, 2f, grid.atlasWidth, grid.atlasHeight),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
object Widgets18 {
|
object Widgets18 {
|
||||||
val GRID = GridAtlas(WidgetLocation.WIDGETS_18, 18f, 18f)
|
private val buttonGrids = WidgetLocation.LARGE_BUTTON.grid(rows = 1, columns = 4)
|
||||||
|
|
||||||
val BUTTON_IDLE_STRETCHABLE = makeButton(GRID)
|
val BUTTON_IDLE_STRETCHABLE = makeButton(buttonGrids)
|
||||||
val BUTTON_IDLE = GRID.next()
|
val BUTTON_IDLE = buttonGrids.next()
|
||||||
val BUTTON_HOVERED_STRETCHABLE = makeButton(GRID)
|
val BUTTON_HOVERED_STRETCHABLE = makeButton(buttonGrids)
|
||||||
val BUTTON_HOVERED = GRID.next()
|
val BUTTON_HOVERED = buttonGrids.next()
|
||||||
val BUTTON_PRESSED_STRETCHABLE = makeButton(GRID)
|
val BUTTON_PRESSED_STRETCHABLE = makeButton(buttonGrids)
|
||||||
val BUTTON_PRESSED = GRID.next()
|
val BUTTON_PRESSED = buttonGrids.next()
|
||||||
val ARROW_DOWN = GRID.next()
|
val BUTTON_DISABLED_STRETCHABLE = makeButton(buttonGrids)
|
||||||
val AZ = GRID.next()
|
val BUTTON_DISABLED = buttonGrids.next()
|
||||||
val COUNT = GRID.next()
|
|
||||||
val COLON = GRID.next()
|
|
||||||
val C = GRID.next()
|
|
||||||
val CROSS = GRID.next()
|
|
||||||
val FORWARD_SLASH = GRID.next()
|
|
||||||
val BATTERY_SLOT_BACKGROUND = GRID.next()
|
|
||||||
val PATTERN_SLOT_BACKGROUND = GRID.next()
|
|
||||||
val EQUIPMENT_BATTERY_SLOT_BACKGROUND = GRID.next()
|
|
||||||
val MATTER_CAPACITOR_SLOT_BACKGROUND = GRID.next()
|
|
||||||
val RETURN_ARROW_LEFT = GRID.next()
|
|
||||||
|
|
||||||
init {
|
private val storageGrid = WidgetLocation.STORAGE_CONTROLS.grid(rows = 1, columns = 5)
|
||||||
GRID.jump()
|
val ARROW_DOWN = storageGrid.next()
|
||||||
}
|
val AZ = storageGrid.next()
|
||||||
|
val COUNT = storageGrid.next()
|
||||||
|
val COLON = storageGrid.next()
|
||||||
|
val C = storageGrid.next()
|
||||||
|
|
||||||
val BUTTON_DISABLED_STRETCHABLE = makeButton(GRID)
|
private val miscGrid = WidgetLocation.MISC_18.grid(4, 4)
|
||||||
val BUTTON_DISABLED = GRID.next()
|
|
||||||
val COOLDOWN = GRID.next()
|
val COOLDOWN = miscGrid.next()
|
||||||
|
val CROSS = miscGrid.next()
|
||||||
|
val FORWARD_SLASH = miscGrid.next()
|
||||||
|
val RETURN_ARROW_LEFT = miscGrid.next()
|
||||||
|
|
||||||
|
private val slotBgGrid = WidgetLocation.SLOT_BACKGROUNDS.grid(4, 4)
|
||||||
|
|
||||||
|
val BATTERY_SLOT_BACKGROUND = slotBgGrid.next()
|
||||||
|
val EQUIPMENT_BATTERY_SLOT_BACKGROUND = slotBgGrid.next()
|
||||||
|
val PATTERN_SLOT_BACKGROUND = slotBgGrid.next()
|
||||||
|
val MATTER_CAPACITOR_SLOT_BACKGROUND = slotBgGrid.next()
|
||||||
|
|
||||||
private val redstoneGrid = WidgetLocation.REDSTONE_CONTROLS.grid(rows = 1, columns = 3)
|
private val redstoneGrid = WidgetLocation.REDSTONE_CONTROLS.grid(rows = 1, columns = 3)
|
||||||
|
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 663 B |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 815 B |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 995 B |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 711 B |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
Loading…
Reference in New Issue
Block a user