Fixed incorrect 'command mode' hint on mobile
This commit is contained in:
@@ -2120,3 +2120,7 @@ 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.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.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", "");
|
String className = getClass().getSimpleName().replace("Marker", "");
|
||||||
return Core.bundle == null ? className : Core.bundle.get("marker." + className.toLowerCase() + ".name", className);
|
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. */
|
/** Displays text above a shape. */
|
||||||
@@ -662,7 +671,7 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
|||||||
Draw.reset();
|
Draw.reset();
|
||||||
|
|
||||||
if(fetchedText == null){
|
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);
|
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
|
@Override
|
||||||
public void draw(){
|
public void draw(){
|
||||||
if(fetchedText == null){
|
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);
|
WorldLabel.drawAt(fetchedText, pos.x, pos.y, Draw.z(), flags, fontSize);
|
||||||
|
|||||||
Reference in New Issue
Block a user