lucymhdavies / egg-game

Live. Bounce. Die. Repeat.
https://labs.lmhd.me/egg
3 stars 0 forks source link

UI #11

Open lucymhdavies opened 5 years ago

lucymhdavies commented 5 years ago

Buttons! Info screens! Metrics! Graphs!

This is gonna need splitting out into smaller tasks, but initially, just a framework for adding something would be useful.

lucymhdavies commented 5 years ago

Use these as initial proof-of-concept:

lucymhdavies commented 5 years ago

Has been worked on a bit today.

https://github.com/lucymhdavies/egg-game/commit/6499df45eeb4d997cf0df9bf92b1b6513bd3133b adds a button to respawn when egg is dead.

https://github.com/lucymhdavies/egg-game/commit/518b559fd41bf90ddbfce12da020e03818457f21 attempts to adds touchscreen version of this, which... doesn't work.

Also need to be able to resize buttons, so split buttons up into smaller images.

lucymhdavies commented 5 years ago

https://github.com/lucymhdavies/egg-game/commit/3c7d0f19aa7f49e9c6130db3595ada0a4fb971fc seems to get touch screen buttons working

lucymhdavies commented 5 years ago

So an initial version of this has been done, but further subtasks to be raised:

lucymhdavies commented 5 years ago

https://github.com/lucymhdavies/egg-game/commit/7d11ceac88b082376303e9326ecd508d592f8613 adds a lot of code, which REALLY needs refactoring, but allows buttons to be of arbitrary size. Just needs button images to be split into components.

https://github.com/lucymhdavies/egg-game/projects/1#card-19238513

lucymhdavies commented 5 years ago

Going to re-implement this as a generic Box type https://github.com/lucymhdavies/egg-game/projects/1#card-19367786

Going to split this into nine images, rather than creating them dynamically

lucymhdavies commented 5 years ago

In tonight's stream, I added a generic UI element interface, so now I understand interfaces better https://github.com/lucymhdavies/egg-game/commit/b5a05289ba243e858cf02205dd581d9119fe9636

I also added a window, a UI element that can contain more UI elements https://github.com/lucymhdavies/egg-game/commit/92133b2c0a45b40a79e323c9ac2c3f41628a036e https://github.com/lucymhdavies/egg-game/commit/64617473e2197364eeb38b1a5908d4bd2285af0c

(for now, it's got some test stuff in it, and is shown/hidden by pressing I)

lucymhdavies commented 5 years ago

https://github.com/lucymhdavies/egg-game/commit/9de337231b9a62ee4c067111bbaffc65cb844e76 adds clickable icons to show/hide the stats window

lucymhdavies commented 5 years ago

Moving this back a column for now.

more subtasks for this:

Really aught to be converted to tickets in their own right