Skip to content

Commit

Permalink
Changed pagination arrows to be 50x50 and with 20% opacity.
Browse files Browse the repository at this point in the history
  • Loading branch information
lanceewing committed Apr 3, 2024
1 parent 4528093 commit a0c2cd2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Binary file modified assets/png/next.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/png/prev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions core/src/main/java/com/agifans/agile/ui/PaginationWidget.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
*/
public class PaginationWidget extends Widget {

private static final int ICON_SIZE = 60;
private static final int PAGINATION_BAR_HEIGHT = 60;

private static final int ICON_SIZE = 50;

private HomeScreen homeScreen;

Expand All @@ -40,7 +42,7 @@ public PaginationWidget(HomeScreen homeScreen, float width) {

prevIconPixmap = new Pixmap(Gdx.files.internal("png/prev.png"));
nextIconPixmap = new Pixmap(Gdx.files.internal("png/next.png"));
pixmap = new Pixmap((int)width, ICON_SIZE, Pixmap.Format.RGBA8888);
pixmap = new Pixmap((int)width, PAGINATION_BAR_HEIGHT, Pixmap.Format.RGBA8888);
texture = new Texture(pixmap, Pixmap.Format.RGBA8888, false);

setSize(getPrefWidth(), getPrefHeight());
Expand All @@ -58,8 +60,8 @@ public void draw(Batch batch, float parentAlpha) {

pixmap.setColor(1.0f, 1.0f, 1.0f, 0.10f);
pixmap.fill();
pixmap.drawPixmap(prevIconPixmap, 0, 0);
pixmap.drawPixmap(nextIconPixmap, width - ICON_SIZE, 0);
pixmap.drawPixmap(prevIconPixmap, 0, 5);
pixmap.drawPixmap(nextIconPixmap, width - ICON_SIZE, 5);

texture.draw(pixmap, 0, 0);

Expand All @@ -71,11 +73,11 @@ public float getPrefWidth () {
}

public float getPrefHeight () {
return ICON_SIZE;
return PAGINATION_BAR_HEIGHT;
}

public float getMaxHeight() {
return ICON_SIZE;
return PAGINATION_BAR_HEIGHT;
}

public void dispose() {
Expand Down

0 comments on commit a0c2cd2

Please sign in to comment.