Closed Aeiiry closed 1 year ago
This feature is really freaking awesome. Thank you for putting it together. I'm excited to get to use it and watch people use it to look up useful information.
FFFFFF 222222 00FF00 FF0000 FFFF00 FFFFFF AAAAAA 222222 AAAAAA EEEEEE 000000 1 1
Drawing.lua
and instead implemented any needed changes at an individual button level, using the button's .draw
function to do any sort of custom drawing. It's possible that in the future we'll want to rework some of the UI elements and button drawing methods, but until then I dont want any global changes to this structure.
PIXELIMAGE_BORDER
you can just use ICON_BORDER
or PIXELIMAGE
then add a custom draw
function to create the rectangle around it.textOffsetX
that would otherwise not exist. You can remove the text
attribute of the button, naming it something else, then draw that text in the button's draw
function to meet your specifications.TrackerScreen.getCurrentCarouselItem
. Otherwise, perhaps its easiest to just remove the blinking.Utils.findInTable
function to be removed. As a black-box approach, I don't understand how to use this function, as it does things that aren't described in the name of the function. It's hard for me to understand how I'd want to use it. With that aside, I also do not understand how this is helping in your current code, or what it's doing exactly. We can discuss in discord if you'd like. I don't think this is necessary, as I removed it and its related code and everything worked fine anyway.In general, for new feature PRs, large scale changes such as changes to Drawing
or Utils
are likely not needed. If you do believe changes like this must be made to accommodate the feature, then please reach out beforehand and discuss with us. In many cases, this larger global changes may affect other features being worked on internally or by others. When able, try and find a solution that doesn't require these changes. But I do understand there will be cases with it makes more sense to make larger scale changes like this for your feature (and potential other new features).
Constants.lua
local
from variables that were also parameters in buildKeyboardButtons
If any of the above changes I made don't seem right to you, let me know and we can discuss or revert. These I felt were obvious enough to just go ahead and do.
All of your requests are very reasonable, I'll go ahead and implement those :). Some of the changes to other files were me getting a bit too ambitious with the scale of things but I agree that those changes can be localised to individual buttons' .draw functions or the screen's draw logic.
I've made changes that I believe adhere to all of your above change requests. I opted to remove the blinking for now as in the small time I spent trying to get it to work it was a bit of a headache dealing with the frame timers. When viewing a tab outside of the "Pokemon" tab the "Search the Log" screen is no longer shown, instead the default/fallback pokemon info screen is shown (Player's starter or bulbasaur)
Thank you for making all of those changes. I tested them out and found a few more minor things I wanted to clean up a little. I'll list them out and commit them following this post. Let me know what you think and if you don't think these adjustments are what you want.
Program.redraw(true)
to update the screen to show the click has happened.
Decided to go ahead and finish this feature to a baseline level and make a PR. Adds the ability to search the log viewer by Ability, Pokemon name, or learnable move, in addition to sorting by a given stat, BST, alphabetical, or pokedex number