mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-10-06 12:57:17 +03:00
Fixed incorrect 'command mode' hint on mobile
This commit is contained in:
parent
26fbf4c71e
commit
494440a591
@ -2119,4 +2119,8 @@ lenum.mine = Mine at a position.
|
||||
lenum.build = Build a structure.
|
||||
lenum.getblock = Fetch a building and type at coordinates.\nUnit must be in range of position.\nSolid non-buildings will have the type [accent]@solid[].
|
||||
lenum.within = Check if unit is near a position.
|
||||
lenum.boost = Start/stop boosting.
|
||||
lenum.boost = Start/stop boosting.
|
||||
|
||||
#Don't translate these yet!
|
||||
onset.commandmode = Hold [accent]shift[] to enter [accent]command mode[].\n[accent]Left-click and drag[] to select units.\n[accent]Right-click[] to order selected units to move or attack.
|
||||
onset.commandmode.mobile = Press the [accent]command button[] to enter [accent]command mode[].\nHold down a finger, then [accent]drag[] to select units.\n[accent]Tap[] to order selected units to move or attack.
|
Binary file not shown.
@ -609,6 +609,15 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
||||
String className = getClass().getSimpleName().replace("Marker", "");
|
||||
return Core.bundle == null ? className : Core.bundle.get("marker." + className.toLowerCase() + ".name", className);
|
||||
}
|
||||
|
||||
public static String fetchText(String text){
|
||||
return text.startsWith("@") ?
|
||||
//on mobile, try ${text}.mobile first for mobile-specific hints.
|
||||
mobile ? Core.bundle.get(text.substring(1) + ".mobile", Core.bundle.get(text.substring(1))) :
|
||||
Core.bundle.get(text.substring(1)) :
|
||||
text;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/** Displays text above a shape. */
|
||||
@ -662,7 +671,7 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
||||
Draw.reset();
|
||||
|
||||
if(fetchedText == null){
|
||||
fetchedText = text.startsWith("@") ? Core.bundle.get(text.substring(1)) : text;
|
||||
fetchedText = fetchText(text);
|
||||
}
|
||||
|
||||
WorldLabel.drawAt(text, pos.x, pos.y + radius + textHeight, Draw.z(), flags, fontSize);
|
||||
@ -774,7 +783,7 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
||||
@Override
|
||||
public void draw(){
|
||||
if(fetchedText == null){
|
||||
fetchedText = text.startsWith("@") ? Core.bundle.get(text.substring(1)) : text;
|
||||
fetchedText = fetchText(text);
|
||||
}
|
||||
|
||||
WorldLabel.drawAt(fetchedText, pos.x, pos.y, Draw.z(), flags, fontSize);
|
||||
|
Loading…
Reference in New Issue
Block a user