Implement alternate colorscheme option for accessibility (resolves #10)#25
Implement alternate colorscheme option for accessibility (resolves #10)#25ByteHamster merged 4 commits intoFlowit-Game:masterfrom
Conversation
- Add a new setting, which allows the user to switch between two colorschemes - Colorscheme preference is an int (0 = default, 1 = alternate), so that if it were desired to add colorschemes later (e.g., for dark theme), it would be easy to do so. - Update texture.xcf to include a second set of colors - Expand texture images from 2048x2048 to 2048x2172 to accommodate the additional settings entry - Each drawable-nodpi dir now has 2 texture files: texture_colorscheme_0.png (the original) and texture_colorscheme_1.png
|
Thanks! Is there a way to re-order the items instead of resizing? I'm not entirely sure which version of OpenGL we are using, but I think we are using 1.0. |
|
Oh, I didn't realize that. Indeed, there's enough blank space to rearrange the textures and keep it within 2048x2048 (I did also need to move the volume icons and header background). |
|
Thanks for updating! Would it somehow be possible to re-load the texture when changing the setting instead of always keeping both textures in memory? I don't know too much about OpenGL, but it feels like that should be somehow possible |
|
That does make sense.... I will look into how to do that. |
As opposed to loading every texture at the start.
|
This update should solve the problem of loading textures when changing colors instead of preloading them. |
|
Awesome, thanks! |
I hope this is an acceptable solution which is not too complicated. I don't have much experience with Java and Android development, but since I mostly followed ByteHamster's existing code (e.g., copying settings buttons) I hope it is ok. I can make any suggested changes, of course.
I did fear I might possibly be breaking ByteHamster's style of keeping everything very clean and separated in
SettingsState.javalines 31 & 45-46, where I saved theglRenderervariable so thatglRenderer.setColorschemecould be called fromonTouchEvent. But I did not think of an alternative.