added play, option, and quit buttons
This commit is contained in:
parent
05a701b643
commit
9629b7edd7
@ -125,9 +125,9 @@ timeline0: 0.0
|
||||
active: false
|
||||
- Tint -
|
||||
colorsCount: 3
|
||||
colors0: 1.0
|
||||
colors1: 0.6627451
|
||||
colors2: 0.23921569
|
||||
colors0: 0.75686276
|
||||
colors1: 0.4117647
|
||||
colors2: 0.0
|
||||
timelineCount: 1
|
||||
timeline0: 0.0
|
||||
- Transparency -
|
||||
@ -137,16 +137,16 @@ highMin: 1.0
|
||||
highMax: 1.0
|
||||
relative: false
|
||||
scalingCount: 5
|
||||
scaling0: 0.21052632
|
||||
scaling1: 0.45614034
|
||||
scaling2: 0.54385966
|
||||
scaling3: 0.45614034
|
||||
scaling0: 0.2982456
|
||||
scaling1: 0.40350878
|
||||
scaling2: 0.49122807
|
||||
scaling3: 0.33333334
|
||||
scaling4: 0.0
|
||||
timelineCount: 5
|
||||
timeline0: 0.0
|
||||
timeline1: 0.56164384
|
||||
timeline2: 0.67808217
|
||||
timeline3: 0.7671233
|
||||
timeline1: 0.46575344
|
||||
timeline2: 0.7123288
|
||||
timeline3: 0.8561644
|
||||
timeline4: 1.0
|
||||
- Options -
|
||||
attached: false
|
||||
|
@ -15,7 +15,8 @@ uniform float weight[5] = float[] (0.227027, 0.1945946, 0.1216216, 0.054054, 0.0
|
||||
|
||||
void main() {
|
||||
vec2 tex_offset = 1.0 / textureSize(u_texture, 0);
|
||||
vec3 result = texture(u_texture, vTexCoord).rgb * weight[0];
|
||||
vec4 color = texture(u_texture, vTexCoord);
|
||||
vec3 result = color.rgb * weight[0];
|
||||
|
||||
if (horizontal == 1) {
|
||||
for (int i = 1; i < 5; ++i) {
|
||||
@ -29,5 +30,5 @@ void main() {
|
||||
}
|
||||
}
|
||||
|
||||
gl_FragColor = vec4(result, 1.0);
|
||||
gl_FragColor = vec4(result, color.a);
|
||||
}
|
@ -318,4 +318,28 @@ large-pane
|
||||
split: 4, 4, 13, 13
|
||||
orig: 9, 27
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
rect
|
||||
rotate: false
|
||||
xy: 176, 35
|
||||
size: 14, 14
|
||||
split: 4, 4, 4, 4
|
||||
orig: 14, 14
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
rect-down
|
||||
rotate: false
|
||||
xy: 191, 35
|
||||
size: 14, 14
|
||||
split: 4, 4, 4, 4
|
||||
orig: 14, 14
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
rect-disabled
|
||||
rotate: false
|
||||
xy: 206, 35
|
||||
size: 14, 14
|
||||
split: 4, 4, 4, 4
|
||||
orig: 14, 14
|
||||
offset: 0, 0
|
||||
index: -1
|
Binary file not shown.
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 6.2 KiB |
@ -20,6 +20,7 @@ import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator;
|
||||
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.FreeTypeFontParameter;
|
||||
import com.badlogic.gdx.math.MathUtils;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.CheckBox.CheckBoxStyle;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.ImageButton.ImageButtonStyle;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.List.ListStyle;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle;
|
||||
@ -230,11 +231,11 @@ public class RhythmBullet extends Game {
|
||||
getDefaultSkin().add("inverse", Color.BLACK);
|
||||
|
||||
TextButtonStyle defaultTextButton = new TextButtonStyle();
|
||||
defaultTextButton.up = getDefaultSkin().getDrawable("default-round");
|
||||
defaultTextButton.down = getDefaultSkin().getDrawable("default-round-down");
|
||||
defaultTextButton.up = getDefaultSkin().getDrawable("rect");
|
||||
defaultTextButton.down = getDefaultSkin().getDrawable("rect-down");
|
||||
defaultTextButton.font = getDefaultSkin().getFont("default-font");
|
||||
defaultTextButton.fontColor = getDefaultSkin().getColor("default");
|
||||
defaultTextButton.disabled = getDefaultSkin().getDrawable("default-round-disabled");
|
||||
defaultTextButton.disabled = getDefaultSkin().getDrawable("rect-disabled");
|
||||
getDefaultSkin().add("default", defaultTextButton);
|
||||
|
||||
TextButtonStyle subTextbutton = new TextButtonStyle(defaultTextButton);
|
||||
|
@ -76,8 +76,8 @@ public class TitleBarVisualizer extends Group implements Disposable {
|
||||
return effect;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void act(float delta) {
|
||||
if (!lastEffect) {
|
||||
|
@ -1,8 +1,18 @@
|
||||
package zero1hd.rhythmbullet.graphics.ui.pages;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.g2d.Batch;
|
||||
import com.badlogic.gdx.math.Vector3;
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.ImageButton;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Label;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Table;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.ImageButton.ImageButtonStyle;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener.ChangeEvent;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
|
||||
import zero1hd.rhythmbullet.RhythmBullet;
|
||||
import zero1hd.rhythmbullet.audio.MusicManager;
|
||||
@ -15,6 +25,10 @@ public class MainPage extends Page implements OnDifferentSongListener {
|
||||
|
||||
private SongListController sc;
|
||||
private TitleBarVisualizer titleBar;
|
||||
private Table table;
|
||||
private TextButton playButton;
|
||||
private TextButton optionsButton;
|
||||
private TextButton quitButton;
|
||||
public MainPage(RhythmBullet core, Vector3 targetPosition, SongListController sc) {
|
||||
this.sc = sc;
|
||||
|
||||
@ -29,6 +43,44 @@ public class MainPage extends Page implements OnDifferentSongListener {
|
||||
core.getDefaultSkin().getColor("default"));
|
||||
versionLabel.setPosition(3, 3);
|
||||
addActor(versionLabel);
|
||||
|
||||
table = new Table();
|
||||
table.setSize(getWidth(), titleBar.getY());
|
||||
table.align(Align.center);
|
||||
table.defaults().space(10f);
|
||||
addActor(table);
|
||||
|
||||
playButton = new TextButton("Start!", core.getDefaultSkin());
|
||||
playButton.addListener(new ChangeListener() {
|
||||
@Override
|
||||
public void changed(ChangeEvent event, Actor actor) {
|
||||
//TODO move to play screen
|
||||
}
|
||||
});
|
||||
table.add(playButton).width(Gdx.graphics.getWidth()*0.2f);
|
||||
|
||||
table.row();
|
||||
|
||||
optionsButton = new TextButton("Options", core.getDefaultSkin(), "sub");
|
||||
optionsButton.addListener(new ChangeListener() {
|
||||
@Override
|
||||
public void changed(ChangeEvent event, Actor actor) {
|
||||
//TODO move to options
|
||||
}
|
||||
});
|
||||
table.add(optionsButton).fillX();
|
||||
|
||||
table.row();
|
||||
|
||||
quitButton = new TextButton("Quit", core.getDefaultSkin(), "sub");
|
||||
quitButton.addListener(new ChangeListener() {
|
||||
@Override
|
||||
public void changed(ChangeEvent event, Actor actor) {
|
||||
Gdx.app.exit();
|
||||
System.exit(0);
|
||||
}
|
||||
});
|
||||
table.add(quitButton).fillX();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user