Skip to content

Commit

Permalink
UI changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kinbei committed Apr 15, 2024
1 parent 757cfec commit f99c818
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,6 @@ local update = interval_call(500, function(datamodel)
datamodel.daynight = _get_daynight_image(gameplay_world)
datamodel.electricity, datamodel.electricity_unit, datamodel.electricity_negative = _get_electricity(gameplay_world)

local gameplay_world = gameplay_core.get_world()
local base = ibackpack.get_base_entity(gameplay_world)

local c = 0
Expand Down
48 changes: 27 additions & 21 deletions startup/pkg/vaststars.resources/ui/detail_panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -282,14 +282,16 @@
<!-- expanded panel - miner -->
<div class="tips-bg" data-if = "areaid == 'expanded-miner-info'" data-event-longpress="onLongPressExpandedPanel(ev)">
<scroll-item-list style="width: 100.00%; height: 80%; gap: 1vmin; align-items: center;">
<div style = "height: 6vmin; width: 75%; color: rgb(0, 255, 104); text-align: left; font-size: 3.5vmin;">成品: </div>
<div style = "width: 100%; gap: 1vmin; align-items: center;" data-for="recipe_ouputs" data-event-click = "clickItem('assembler', 'outputs', it.index)">
<div style="flex-direction: row; width: 75%; height: 12.5vmin; gap: 1vmin;">
<div class="small-item1" style="flex-grow: 0; width: 12.5vmin; height: 12.5vmin; border: 0.3vmin rgb(0, 217, 255);" data-style-background-image="it.icon" />
<div style = "width: 50%; font-size: 4.8vmin; justify-content: flex-end; word-break: break-all;">{{it.name}}</div>
<div style = "flex-grow: 1; font-size: 4.8vmin; justify-content: flex-end;">x {{it.count}}</div>
<div style = "gap: 1vmin; background-image: '/pkg/vaststars.resources/ui/textures/item-config/category-bg.texture'; width: 80%; background-size: 23.50vmax 23.13vmin;">
<div style = "margin-top: 3vmin; margin-left: 3vmin; height: 6vmin; color: rgb(0, 255, 104); text-align: left; font-size: 3.5vmin;">成品: </div>
<div style = "width: 100%; gap: 1vmin; align-items: center;" data-for="recipe_ouputs" data-event-click = "clickItem('assembler', 'outputs', it.index)">
<div style="flex-direction: row; height: 12.5vmin; gap: 1vmin;">
<div class="small-item1" style="flex-grow: 0; width: 12.5vmin; height: 12.5vmin;" data-style-background-image="it.icon" />
<div style = "width: 50%; font-size: 4.8vmin; justify-content: flex-end; word-break: break-all;">{{it.name}}</div>
<div style = "flex-grow: 1; font-size: 4.8vmin; justify-content: flex-end;">x {{it.count}}</div>
</div>
<div style="width: 90%; height: 0.10vmin; background-color: rgb(114, 108, 104);" />
</div>
<div style="width: 82%; height: 0.10vmin; background-color: rgb(114, 108, 104);" />
</div>
</scroll-item-list>
</div>
Expand All @@ -299,24 +301,28 @@
<scroll-item-list style="width: 100.00%; height: 80%; gap: 1vmin; align-items: center;">
<div style = "height: 6vmin; color: rgb(246, 142, 14); text-align: center; font-size: 4.8vmin;">{{recipe_name}}</div>

<div style = "height: 6vmin; width: 75%; color: rgb(0, 255, 104); text-align: left; font-size: 3.5vmin;">原料: </div>
<div style = "width: 100%; gap: 1vmin; align-items: center;" data-for="recipe_inputs" data-event-click = "clickItem('assembler', 'inputs', it.index)">
<div style="flex-direction: row; width: 75%; height: 12.5vmin; gap: 1vmin;">
<div class="small-item1" style="flex-grow: 0; width: 12.5vmin; height: 12.5vmin; border: 0.3vmin rgb(0, 217, 255);" data-style-background-image="it.icon" />
<div style = "width: 50%; font-size: 4.8vmin; justify-content: flex-end; word-break: break-all;">{{it.name}}</div>
<div style = "flex-grow: 1; font-size: 4.8vmin; justify-content: flex-end;">x {{it.count}}</div>
<div style = "gap: 1vmin; background-image: '/pkg/vaststars.resources/ui/textures/item-config/category-bg.texture'; width: 80%; background-size: 23.50vmax 23.13vmin;">
<div style = "margin-top: 3vmin; margin-left: 3vmin; height: 6vmin; color: rgb(0, 255, 104); text-align: left; font-size: 3.5vmin;">原料: </div>
<div style = "width: 100%; gap: 1vmin; align-items: center;" data-for="recipe_inputs" data-event-click = "clickItem('assembler', 'inputs', it.index)">
<div style="flex-direction: row; height: 12.5vmin; gap: 1vmin;">
<div class="small-item1" style="flex-grow: 0; width: 12.5vmin; height: 12.5vmin; border: 0.3vmin rgb(0, 217, 255);" data-style-background-image="it.icon" />
<div style = "width: 50%; font-size: 4.8vmin; justify-content: flex-end; word-break: break-all;">{{it.name}}</div>
<div style = "flex-grow: 1; font-size: 4.8vmin; justify-content: flex-end;">x {{it.count}}</div>
</div>
<div style="width: 90%; height: 0.10vmin; background-color: rgb(114, 108, 104);" />
</div>
<div style="width: 82%; height: 0.10vmin; background-color: rgb(114, 108, 104);" />
</div>

<div style = "height: 6vmin; width: 75%; color: rgb(0, 255, 104); text-align: left; font-size: 3.5vmin;">成品: </div>
<div style = "width: 100%; gap: 1vmin; align-items: center;" data-for="recipe_ouputs" data-event-click = "clickItem('assembler', 'outputs', it.index)">
<div style="flex-direction: row; width: 75%; height: 12.5vmin; gap: 1vmin;">
<div class="small-item1" style="flex-grow: 0; width: 12.5vmin; height: 12.5vmin; border: 0.3vmin rgb(0, 217, 255);" data-style-background-image="it.icon" />
<div style = "width: 50%; font-size: 4.8vmin; justify-content: flex-end; word-break: break-all;">{{it.name}}</div>
<div style = "flex-grow: 1; font-size: 4.8vmin; justify-content: flex-end;">x {{it.count}}</div>
<div style = "gap: 1vmin; background-image: '/pkg/vaststars.resources/ui/textures/item-config/category-bg.texture'; width: 80%; background-size: 23.50vmax 23.13vmin;">
<div style = "margin-top: 3vmin; margin-left: 3vmin; height: 6vmin; color: rgb(0, 255, 104); text-align: left; font-size: 3.5vmin;">成品: </div>
<div style = "width: 100%; gap: 1vmin; align-items: center;" data-for="recipe_ouputs" data-event-click = "clickItem('assembler', 'outputs', it.index)">
<div style="flex-direction: row; height: 12.5vmin; gap: 1vmin;">
<div class="small-item1" style="flex-grow: 0; width: 12.5vmin; height: 12.5vmin; border: 0.3vmin rgb(0, 217, 255);" data-style-background-image="it.icon" />
<div style = "width: 50%; font-size: 4.8vmin; justify-content: flex-end; word-break: break-all;">{{it.name}}</div>
<div style = "flex-grow: 1; font-size: 4.8vmin; justify-content: flex-end;">x {{it.count}}</div>
</div>
<div style="width: 90%; height: 0.10vmin; background-color: rgb(114, 108, 104);" />
</div>
<div style="width: 82%; height: 0.10vmin; background-color: rgb(114, 108, 104);" />
</div>
</scroll-item-list>
</assembler-info>
Expand Down

0 comments on commit f99c818

Please sign in to comment.