mirror of
https://github.com/Klagarge/PokeHES.git
synced 2025-01-31 05:02:45 +00:00
finish format text
This commit is contained in:
parent
83fc312efb
commit
5d0d638275
@ -16,6 +16,7 @@ import com.badlogic.gdx.maps.tiled.TmxMapLoader;
|
||||
import com.badlogic.gdx.maps.tiled.renderers.OrthogonalTiledMapRenderer;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
import Entity.Character.Direction;
|
||||
import Entity.Player;
|
||||
import ch.hevs.gdx2d.components.screen_management.RenderingScreen;
|
||||
import ch.hevs.gdx2d.lib.GdxGraphics;
|
||||
@ -160,7 +161,7 @@ public class ScreenMap extends RenderingScreen{
|
||||
try { Door.nextMap = mapProperties.get("nextMap").toString(); } catch (Exception e) { }
|
||||
try { Door.nextX = Integer.parseInt(mapProperties.get("nextX").toString()); } catch (Exception e) { }
|
||||
try { Door.nextY = Integer.parseInt(mapProperties.get("nextY").toString()); } catch (Exception e) { }
|
||||
try { Door.nextDirection = Door.nextDirection.valueOf(mapProperties.get("nextDirection").toString()); } catch (Exception e) { }
|
||||
try { Door.nextDirection = Direction.valueOf(mapProperties.get("nextDirection").toString()); } catch (Exception e) { }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,17 +14,23 @@ import java.util.RandomAccess;
|
||||
class testYann{
|
||||
public static void main(String[] args) {
|
||||
|
||||
System.out.println(111);
|
||||
|
||||
String line = " Je vais te manger tout cru asdnkajsdh asl ";
|
||||
|
||||
String text = "aaaaaa aaaaaa\naaaaaa aaaaaa";
|
||||
String newText ="";
|
||||
String cutLine = "";
|
||||
String newLine = "";
|
||||
|
||||
int cut = 12;
|
||||
int cut = 6;
|
||||
|
||||
int startC = 0;
|
||||
int stoppC = cut;
|
||||
|
||||
String[] s = text.split("\n");
|
||||
|
||||
for(String line : s){
|
||||
System.out.println(line);
|
||||
|
||||
if(cut>line.length()-1){
|
||||
newLine =line;
|
||||
}
|
||||
@ -72,13 +78,19 @@ class testYann{
|
||||
}
|
||||
}
|
||||
|
||||
newText += newLine + "\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println(newLine);
|
||||
|
||||
|
||||
|
||||
System.out.println(newText);
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user