コード例 #1
0
ファイル: GUIComponent.java プロジェクト: Weirdbob95/Forge
  protected static Vec2 findMid(String t, Vec2 d) {

    int tl = t.length();
    double h = FONT.getHeight() / 2.0;
    double w = (FONT.getWidth(" ") * tl) / 2.0;
    return d.divide(2).subtract(new Vec2(w, h));
  }