Skip to content

Commit

Permalink
Bonk
Browse files Browse the repository at this point in the history
  • Loading branch information
wheremyfoodat committed Jan 3, 2024
1 parent 1efb149 commit d7d0128
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public BottomAlertDialog setTextInput(String hint, Function<String> listener) {
public AlertDialog show() {
AlertDialog dialog = create();
dialog.show();

return dialog;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import com.panda3ds.pandroid.view.controller.mapping.Profile;

public class ControllerMapperPreferences extends Fragment {

private Profile currentProfile;
private ControllerMapper mapper;
private View saveButton;
Expand All @@ -31,7 +30,6 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
return inflater.inflate(R.layout.preference_controller_mapper, container, false);
}


@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
int measuredWidth = getMeasuredWidth();
int measuredHeight = getMeasuredHeight();
if (measuredWidth != width || measuredHeight != height){

if (measuredWidth != width || measuredHeight != height) {
width = measuredWidth;
height = measuredHeight;
applyProfileMap();
Expand All @@ -68,6 +69,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {

private void applyProfileMap() {
Profile profile = ControllerProfileManager.getDefaultProfile();

profile.applyToView(ControllerItem.L,findViewById(R.id.button_l), width, height);
profile.applyToView(ControllerItem.R, findViewById(R.id.button_r), width, height);
profile.applyToView(ControllerItem.START, findViewById(R.id.button_start), width, height);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ private void drawBackground(Canvas canvas) {
int shapeSize = Math.round(getResources().getDimension(R.dimen.SizePt) * 7.2f);
boolean dark = true;
boolean start = true;

for (int x = 0; x < width + shapeSize; x += shapeSize) {
for (int y = 0; y < height + shapeSize; y += shapeSize) {
paint.setColor(dark ? COLOR_DARK : COLOR_LIGHT);
Expand All @@ -125,6 +126,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
int measuredWidth = getMeasuredWidth();
int measuredHeight = getMeasuredHeight();

if (measuredWidth != width || measuredHeight != height) {
width = measuredWidth;
height = measuredHeight;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ public class Location {
private int gravity = Gravity.LEFT;
private boolean visible = false;

public Location() {
}
public Location() {}

public Location(float x, float y, int gravity, boolean visible) {
this.x = x;
Expand Down

0 comments on commit d7d0128

Please sign in to comment.