fixed buttons

This commit is contained in:
TheCodeBoat 2014-02-11 21:44:57 +01:00
parent 847409b426
commit 4be216938c
9 changed files with 32 additions and 15 deletions

View File

@ -10,7 +10,7 @@
<a value="1.0" />
</property>
<property name="textAlign" type="String" value="Center" />
<property name="textVAlign" type="String" value="Center" />
<property name="textVAlign" type="String" value="Top" />
<property name="textWrap" type="String" value="NoWrap" />
<property name="hoverColor" type="ColorRGBA">
<r value="1.0" />

View File

@ -94,6 +94,7 @@ public class FileMetaInfoGUI extends BackgroundedGui implements Gui {
listener.startLoading();
}
};
btnStartLoading.setTextPadding(screenHelper.calcY(10f));
btnStartLoading.setText("Play");
btnStartLoading.setFontSize(labelFontSize);
@ -103,6 +104,7 @@ public class FileMetaInfoGUI extends BackgroundedGui implements Gui {
listener.cancel();
}
};
btnCancel.setTextPadding(screenHelper.calcY(10f));
btnCancel.setText("Cancel");
btnCancel.setFontSize(labelFontSize);

View File

@ -77,38 +77,41 @@ public class GameGUI extends Panel implements Gui{
float labelFontSize = screenHelper.calcX(20f);
btnStart = new ButtonBase(screen, new Vector2f(startPointx, startPointy),
new Vector2f(screenHelper.calcX(200f), screenHelper.calcY(30f))) {
new Vector2f(screenHelper.calcX(200f), screenHelper.calcY(40f))) {
@Override
public void onButtonMouseLeftUp(MouseButtonEvent evt, boolean toggled) {
listener.start();
}
};
};
btnStart.setTextPadding(screenHelper.calcY(10f));
btnStart.setText("Launch");
btnStart.setTextAlign(BitmapFont.Align.Center);
btnStart.setFontSize(labelFontSize);
btnResume = new ButtonBase(screen, new Vector2f(startPointx, startPointYMenu),
new Vector2f(screenHelper.calcX(200f), screenHelper.calcY(30f))) {
new Vector2f(screenHelper.calcX(200f), screenHelper.calcY(40f))) {
@Override
public void onButtonMouseLeftUp(MouseButtonEvent evt, boolean toggled) {
listener.resume();
}
};
};
btnResume.setTextPadding(screenHelper.calcY(10f));
btnResume.setText("Resume");
btnResume.setTextAlign(BitmapFont.Align.Center);
btnResume.setFontSize(labelFontSize);
btnMenu = new ButtonBase(screen, new Vector2f(startPointx, startPointYMenu + screenHelper.calcY(40f)),
new Vector2f(screenHelper.calcX(200f), screenHelper.calcY(30f))) {
btnMenu = new ButtonBase(screen, new Vector2f(startPointx, startPointYMenu + screenHelper.calcY(50f)),
new Vector2f(screenHelper.calcX(200f), screenHelper.calcY(40f))) {
@Override
public void onButtonMouseLeftUp(MouseButtonEvent evt, boolean toggled) {
listener.cancelTrack();
}
};
};
btnMenu.setTextPadding(screenHelper.calcY(10f));
btnMenu.setText("Menu");
btnMenu.setTextAlign(BitmapFont.Align.Center);
btnMenu.setFontSize(labelFontSize);
indOverheat = new Indicator(screen, new Vector2f(0f, 0f), Indicator.Orientation.VERTICAL) {
@Override
public void onChange(float arg0, float arg1) {

View File

@ -105,6 +105,7 @@ public class HighscoreGUI extends BackgroundedGui implements Gui {
listener.back();
}
};
btnBack.setTextPadding(screenHelper.calcY(10f));
btnBack.setText("Back");
btnBack.setFontSize(buttonFontSize);
@ -117,6 +118,7 @@ public class HighscoreGUI extends BackgroundedGui implements Gui {
drawHighscores(scores);
}
};
btnFilter.setTextPadding(screenHelper.calcY(10f));
btnFilter.setText("Filter Song Name");
btnFilter.setFontSize(buttonFontSize);

View File

@ -55,7 +55,6 @@ public class LoadingGui extends BackgroundedGui implements Gui {
indProgress = new IndicatorBase(screen, new Vector2f(startPointx, startPointy),
new Vector2f(screenHelper.calcX(200f), screenHelper.calcY(30f)), Indicator.Orientation.HORIZONTAL);
indProgress.setIndicatorImage("Gui/Indicator/indicator_ol_x.png");
indProgress.setDisplayValues();
indProgress.setMaxValue(LoadingProgress.getProgressCount());
indProgress.setIndicatorColor(ColorRGBA.Black);

View File

@ -70,6 +70,7 @@ public class MenuGUI extends BackgroundedGui implements Gui {
listener.selectFile();
}
};
btnStart.setTextPadding(screenHelper.calcY(10f));
btnStart.setText("Start Game");
btnStart.setFontSize(buttonFontSize);
@ -79,6 +80,7 @@ public class MenuGUI extends BackgroundedGui implements Gui {
listener.openhighscore();
}
};
btnHighscore.setTextPadding(screenHelper.calcY(10f));
btnHighscore.setText("Highscore");
btnHighscore.setFontSize(buttonFontSize);
@ -88,6 +90,7 @@ public class MenuGUI extends BackgroundedGui implements Gui {
listener.openOptions();
}
};
btnOptions.setTextPadding(screenHelper.calcY(10f));
btnOptions.setText("Options");
btnOptions.setFontSize(buttonFontSize);
@ -97,6 +100,7 @@ public class MenuGUI extends BackgroundedGui implements Gui {
listener.exitGame();
}
};
btnExit.setTextPadding(screenHelper.calcY(10f));
btnExit.setText("Exit Game");
btnExit.setFontSize(buttonFontSize);

View File

@ -98,6 +98,7 @@ public class OptionsGUI extends BackgroundedGui implements Gui {
listener.save();
}
};
btnSave.setTextPadding(screenHelper.calcY(10f));
btnSave.setText("Save");
btnSave.setFontSize(labelFontSize);
@ -107,6 +108,7 @@ public class OptionsGUI extends BackgroundedGui implements Gui {
listener.cancel();
}
};
btnCancel.setTextPadding(screenHelper.calcY(10f));
btnCancel.setText("Cancel");
btnCancel.setFontSize(labelFontSize);

View File

@ -64,6 +64,7 @@ public class SelectTrackGUI extends BackgroundedGui implements Gui {
listener.selectFile();
}
};
btnSelectFile.setTextPadding(screenHelper.calcY(10f));
btnSelectFile.setText("Select File");
btnSelectFile.setFontSize(buttonFontSize);
@ -77,6 +78,7 @@ public class SelectTrackGUI extends BackgroundedGui implements Gui {
listener.downloadYT();
}
};
btnYTDownload.setTextPadding(screenHelper.calcY(10f));
btnYTDownload.setText("YT Download");
btnYTDownload.setFontSize(buttonFontSize);
@ -86,6 +88,7 @@ public class SelectTrackGUI extends BackgroundedGui implements Gui {
listener.cancel();
}
};
btnCancel.setTextPadding(screenHelper.calcY(10f));
btnCancel.setText("Cancel");
btnCancel.setFontSize(buttonFontSize);

View File

@ -79,6 +79,7 @@ public class YTDownloadGUI extends BackgroundedGui implements Gui {
listener.downloadYTVideo(txtYTLink.getText());
}
};
btnYTDownload.setTextPadding(screenHelper.calcY(10f));
btnYTDownload.setText("Download");
btnYTDownload.setFontSize(buttonFontSize);
@ -88,6 +89,7 @@ public class YTDownloadGUI extends BackgroundedGui implements Gui {
listener.cancel();
}
};
btnCancel.setTextPadding(screenHelper.calcY(10f));
btnCancel.setText("Cancel");
btnCancel.setFontSize(buttonFontSize);