Hi everyone!
My first time with Idea and the code of Destination Sol, I really wanted to make a "Don't sell equipped items" option, so I won't accidentally sell some over powered gear I spent some time to acquire!
The code base is really neat, I found my way around it nicely! The pull request is at
https://github.com/MovingBlocks/DestinationSol/pull/118
A few questions:
I found the SolShip:maybeEquip and maybeUnequip functions to be not self-explanatory at first, is adding javadoc to the code part of the coding style here? Or maybe split it into a canEquip and Equip function?
With placing the button I had two issues:
First time I placed it to the second index (menuLayout.buttonRect(-1, 2)), and shifted the index of the other buttons, but then the exit button was under the screen. Then I looked at the MenuLayout class, and increased row0, which fixed the issue, but then all the screens had their buttons up by 1, which looked bad on the main menu. So I went with the -1 index, which put the button in the right place, but feels a bit awkward. Maybe the screen should be indexed in a bottom to top way?
My other problem was that the text was too long, and went off the edges of the button. I increased the button width (menuLayout:btnW variable) from 25% to 30%, but it probably won't be enough for all possible resolutions. I was wondering if word-wrapping was possible with the buttons?
My first time with Idea and the code of Destination Sol, I really wanted to make a "Don't sell equipped items" option, so I won't accidentally sell some over powered gear I spent some time to acquire!
The code base is really neat, I found my way around it nicely! The pull request is at
https://github.com/MovingBlocks/DestinationSol/pull/118
A few questions:
I found the SolShip:maybeEquip and maybeUnequip functions to be not self-explanatory at first, is adding javadoc to the code part of the coding style here? Or maybe split it into a canEquip and Equip function?
With placing the button I had two issues:
First time I placed it to the second index (menuLayout.buttonRect(-1, 2)), and shifted the index of the other buttons, but then the exit button was under the screen. Then I looked at the MenuLayout class, and increased row0, which fixed the issue, but then all the screens had their buttons up by 1, which looked bad on the main menu. So I went with the -1 index, which put the button in the right place, but feels a bit awkward. Maybe the screen should be indexed in a bottom to top way?
My other problem was that the text was too long, and went off the edges of the button. I increased the button width (menuLayout:btnW variable) from 25% to 30%, but it probably won't be enough for all possible resolutions. I was wondering if word-wrapping was possible with the buttons?