Better item display rates
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
package mindustry.ui;
|
package mindustry.ui;
|
||||||
|
|
||||||
import arc.graphics.*;
|
|
||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
@@ -31,8 +30,7 @@ public class ItemDisplay extends Table{
|
|||||||
/** Displays the item with a "/sec" qualifier based on the time period, in ticks. */
|
/** Displays the item with a "/sec" qualifier based on the time period, in ticks. */
|
||||||
public ItemDisplay(Item item, int amount, float timePeriod, boolean showName){
|
public ItemDisplay(Item item, int amount, float timePeriod, boolean showName){
|
||||||
add(new ItemImage(item.uiIcon, amount));
|
add(new ItemImage(item.uiIcon, amount));
|
||||||
add(Strings.autoFixed(amount / (timePeriod / 60f), 2) + StatUnit.perSecond.localized()).padLeft(2).padRight(5).color(Color.lightGray).style(Styles.outlineLabel);
|
add((showName ? item.localizedName + "\n" : "") + "[lightgray]" + Strings.autoFixed(amount / (timePeriod / 60f), 2) + StatUnit.perSecond.localized()).padLeft(2).padRight(5).style(Styles.outlineLabel);
|
||||||
if(showName) add(item.localizedName).padLeft(4 + amount > 99 ? 4 : 0);
|
|
||||||
|
|
||||||
this.item = item;
|
this.item = item;
|
||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
|
|||||||
Reference in New Issue
Block a user