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

Trees GUI improvements #8234

Open
wants to merge 3 commits into
base: master
from
Open

Trees GUI improvements #8234

wants to merge 3 commits into from

Conversation

@nielsmh
Copy link
Contributor

@nielsmh nielsmh commented Jun 22, 2020

Mostly a code change, but has the neat side effect of not drawing more buttons than are tree types in the current climate. Also fixes some scaling margin issues on 2x and 4x GUI scale.
Future proofing for maybe making NewGRF trees one day.

Later goal: Better tree painting modes for scenario editor.

image
image

@nielsmh nielsmh force-pushed the nielsmh:treetools branch from 6bbea3c to ed05b4d Jun 22, 2020
src/tree_gui.cpp Outdated Show resolved Hide resolved
@nielsmh nielsmh force-pushed the nielsmh:treetools branch from ed05b4d to 7a9b357 Jun 23, 2020
@nielsmh
Copy link
Contributor Author

@nielsmh nielsmh commented Jun 23, 2020

Well, I scrapped the NWID_MATRIX based code again, turns out it's really hard to get that to size well, individual buttons actually is easier. Now just generating the buttons instead of having a fixed layout.

@nielsmh
Copy link
Contributor Author

@nielsmh nielsmh commented Jun 26, 2020

Now it looks like this:
image

Planting a "grove" results in something like this:
image

Planting a "forest" results in something like this:
image

src/tree_cmd.cpp Show resolved Hide resolved
@nielsmh nielsmh force-pushed the nielsmh:treetools branch from 24083d0 to 6f809d6 Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.