Info Pages will now display tool tips for any item icons (#289)

* All block info dialogs will now display tool tips for the liquids and items which are required

* Reverted accidental dependency addition

* Drills will now display tool tips as well (except cultivator)
This commit is contained in:
Timmeey86
2018-11-01 02:29:15 +01:00
committed by Anuken
parent 8716695d4e
commit 02a90856ff
9 changed files with 79 additions and 13 deletions

View File

@@ -6,10 +6,10 @@ import io.anuke.mindustry.game.Content;
import io.anuke.mindustry.game.UnlockableContent;
import io.anuke.mindustry.graphics.Palette;
import io.anuke.mindustry.type.ContentType;
import io.anuke.mindustry.world.meta.StatValue;
import io.anuke.ucore.scene.event.HandCursorListener;
import io.anuke.ucore.scene.ui.Image;
import io.anuke.ucore.scene.ui.ScrollPane;
import io.anuke.ucore.scene.ui.Tooltip;
import io.anuke.ucore.scene.ui.layout.Table;
import io.anuke.ucore.scene.utils.UIUtils;
@@ -65,10 +65,7 @@ public class UnlocksDialog extends FloatingDialog{
if(control.unlocks.isUnlocked(unlock)){
image.clicked(() -> Vars.ui.content.show(unlock));
image.addListener(new Tooltip<>(new Table("clear"){{
add(unlock.localizedName());
margin(4);
}}));
StatValue.addToolTip(image, unlock);
}
if((++count) % maxWidth == 0){