Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] User configurable input overlay scaling #580

Merged
merged 1 commit into from Jul 16, 2014
Merged

[Android] User configurable input overlay scaling #580

merged 1 commit into from Jul 16, 2014

Conversation

Hydr8gon
Copy link
Member

@Hydr8gon Hydr8gon commented Jul 8, 2014

I extended this from simply shrinking the B button. I resized the B, X, Y and start buttons, but the main thing is user configurable scaling of the onscreen input. The minimum is 50%, the maximum is 200%, and the default is 100%.

Screenshots:
http://i.imgur.com/SBcxDsi.png
http://i.imgur.com/lv16N0Z.png
http://i.imgur.com/e2XFj08.png
http://i.imgur.com/1AJ4nQn.png
http://i.imgur.com/juhoXok.png
(This last one has a very slightly smaller B button to better match actual controller)
http://i.imgur.com/K63Zl4A.png

@lioncash
Copy link
Member

lioncash commented Jul 8, 2014

Image of before and after?

@Hydr8gon
Copy link
Member Author

Hydr8gon commented Jul 8, 2014

@lioncash added to top comment

@lioncash
Copy link
Member

lioncash commented Jul 8, 2014

Wouldn't it be easier to scale the B button in the assets relative to the A button? That way it wouldn't need to be downsized like this at runtime.

Ping @MaJoRoesch

@Hydr8gon
Copy link
Member Author

Hydr8gon commented Jul 8, 2014

@lioncash I resized the B button the same way the joystick was already being resized. When resizeBitmap is called, it resizes all buttons before drawing them to the screen depending on what the scale value is. Basically, every button is already being scaled before being drawn.

@lioncash
Copy link
Member

lioncash commented Jul 8, 2014

Ah ok. All is good then.

@Hydr8gon Hydr8gon changed the title [Android] Decrease size of onscreen B button [Android] User configurable input overlay scaling Jul 8, 2014
@Hydr8gon
Copy link
Member Author

Hydr8gon commented Jul 8, 2014

Extended this PR from just the B button.

@MayImilae
Copy link
Contributor

Shrink the B button a tiny bit more and you'll be accurate to hardware. (Used the A button as relative scale)

gamecube-controller-breakdown_02

gamecube-controller-breakdown_03

Reference is below. I made the buttons with hardware scaling in mind, so ideally all the letters will be the same size on hardware accurate scaling. You can use that as a reference too if you'd like.

Reference - http://commons.wikimedia.org/wiki/File:Gamecube-controller-breakdown.jpg

@Hydr8gon
Copy link
Member Author

Hydr8gon commented Jul 9, 2014

@MaJoRoesch I did originally have it smaller, but I didn't know if it would be too small or not. I can bump it down if it's that small a difference though.

@MayImilae
Copy link
Contributor

Might as well make it accurate to hardware when you are this close! They can always scale everything up. :D

@Hydr8gon
Copy link
Member Author

Hydr8gon commented Jul 9, 2014

That took way too long, I'm on vacation right now and the Internet here has nearly non-existent upload/download speeds along with disconnecting every 3 seconds... Anyways, I'll try to upload another screenshot, although it was hell to upload the other ones. Oh yeah, I also squashed the 2 commits into one for easier editing.

Edit: Got it to upload: http://i.imgur.com/K63Zl4A.png

@lioncash
Copy link
Member

@dolphin-emu-bot rebuild

@MayImilae
Copy link
Contributor

Eh, not perfect, but very close so good enough. Now if someone could just fix that scaling aliasing... ;)

float overlaySize = sharedPrefs.getInt("controls_size", 25);
overlaySize += 25;
overlaySize /= 50;

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@lioncash
Copy link
Member

@dolphin-emu-bot rebuild

Final rebuild

lioncash added a commit that referenced this pull request Jul 16, 2014
[Android] User configurable input overlay scaling
@lioncash lioncash merged commit 30e4366 into dolphin-emu:master Jul 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants