Use scss syntax

This commit is contained in:
Joshua Rodriguez 2020-01-14 08:03:17 -08:00
parent 9cc466e177
commit cebe8b93ad
5 changed files with 93 additions and 97 deletions

View File

@ -34,38 +34,38 @@ import de.bluecolored.bluemap.core.util.AABB;
public class TileRenderer {
private HiresModelManager hiresModelManager;
private LowresModelManager lowresModelManager;
public TileRenderer(HiresModelManager hiresModelManager, LowresModelManager lowresModelManager) {
this.hiresModelManager = hiresModelManager;
this.lowresModelManager = lowresModelManager;
}
/**
* Renders the provided WorldTile (only) if the world is generated
* @throws IOException If an IO-Exception occurs during the render
*/
public void render(WorldTile tile) throws IOException {
//check if the region is generated before rendering, don't render if it's not generated
//check if the region is generated before rendering, don't render if it's not generated
AABB area = hiresModelManager.getTileRegion(tile);
if (!tile.getWorld().isAreaGenerated(area)) return;
HiresModel hiresModel = hiresModelManager.render(tile);
lowresModelManager.render(hiresModel);
}
/**
* Saves changes to disk
*/
public void save(){
lowresModelManager.save();
}
public HiresModelManager getHiresModelManager() {
return hiresModelManager;
}
public LowresModelManager getLowresModelManager() {
return lowresModelManager;
}
}

View File

@ -1,72 +1,71 @@
#alert-box {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-content: center;
justify-content: center;
flex-wrap: wrap;
flex-direction: column;
pointer-events: none;
}
#alert-box h1 {
font-size: 1.4rem;
font-weight: bold;
margin: 0;
padding: 15px;
text-align: center;
}
#alert-box h2 {
font-size: 1.2rem;
font-weight: bold;
margin: 0;
padding: 15px 0 5px 0;
text-align: left;
}
#alert-box a {
color: #333333;
text-decoration: underline;
}
#alert-box a:hover {
color: #888888;
}
#alert-box .alert {
position: relative;
pointer-events: all;
margin: 10px;
padding: 10px;
}
#alert-box .alert .alert-close-button {
/*position: absolute;
top: 5px;
right: 5px;
*/
margin: -10px -10px 0px 0px;
padding: 0 0 5px 5px;
float: right;
width: 15px;
height: 15px;
line-height: 15px;
font-weight: bold;
font-size: 15px;
color: #333333;
}
#alert-box .alert .alert-close-button::after {
content: 'x';
}
#alert-box .alert .alert-close-button:hover {
color: #dd3333;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-content: center;
justify-content: center;
flex-wrap: wrap;
flex-direction: column;
pointer-events: none;
h1 {
font-size: 1.4rem;
font-weight: bold;
margin: 0;
padding: 15px;
text-align: center;
}
h2 {
font-size: 1.2rem;
font-weight: bold;
margin: 0;
padding: 15px 0 5px 0;
text-align: left;
}
a {
color: #333333;
text-decoration: underline;
&:hover {
color: #888888;
}
}
.alert {
position: relative;
pointer-events: all;
margin: 10px;
padding: 10px;
.alert-close-button {
/*position: absolute;
top: 5px;
right: 5px;
*/
margin: -10px -10px 0px 0px;
padding: 0 0 5px 5px;
float: right;
width: 15px;
height: 15px;
line-height: 15px;
font-weight: bold;
font-size: 15px;
color: #333333;
&::after {
content: 'x';
}
&:hover {
color: #dd3333;
}
}
}
}

View File

@ -1,9 +1,8 @@
#bluemap-compass {
width: 30px;
height: 30px;
}
width: 30px;
height: 30px;
#bluemap-compass:hover #bluemap-compass-needle {
filter: invert(1);
&:hover #bluemap-compass-needle {
filter: invert(1);
}
}

View File

@ -1,11 +1,10 @@
#bluemap-info {
width: 30px;
height: 30px;
text-align: center;
width: 30px;
height: 30px;
text-align: center;
}
#bluemap-info::after {
content: 'i';
font-weight: bold;
&::after {
content: 'i';
font-weight: bold;
}
}

View File

@ -1,8 +1,7 @@
#bluemap-mapmenu {
width: 200px;
}
width: 200px;
#bluemap-mapmenu .selection, #bluemap-mapmenu .dropdown li {
padding-left: 10px;
.selection, .dropdown li {
padding-left: 10px;
}
}