preparing property dialog

This commit is contained in:
Stephan Richter
2020-09-13 01:25:56 +02:00
parent b14b8fff15
commit 497e36686b
4 changed files with 20 additions and 5 deletions

View File

@@ -6,9 +6,15 @@ public class Window extends Tag{
private static final long serialVersionUID = 9035075889261889575L;
public Window(String id) {
public Window(String id, String title) {
super("div");
id(id);
new Tag("div").clazz("closebtn").attr("onclick", "$('#"+id+"').remove(); return false").content("×").addTo(this);
new Tag("h2")
.clazz("title")
.content(title).addTo(this);
new Tag("div")
.clazz("closebtn")
.attr("onclick", "$('#"+id+"').remove(); return false")
.content("×").addTo(this);
}
}

View File

@@ -58,12 +58,12 @@ public abstract class Tile {
return svg.toString();
}
private String t(String txt, Object...fills) {
private static String t(String txt, Object...fills) {
return Translation.get(Application.class, txt, fills);
}
public static Tag propMenu() {
return new Window("tile-properties").content("Eigenschaften...");
return new Window("tile-properties",t("Properties")).content(t("This tile has no properties"));
}
}