roact app tree.txt 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. heres how the ui should be structured?
  2. -- minimize component state, should only be used for animation and other self contained things.
  3. appRoot {
  4. app {
  5. statframe {
  6. coinStatLabel
  7. -- any other important stats
  8. }
  9. menubarframe {
  10. inventorybutton -- open your inventory
  11. shopbutton -- open the shop
  12. homebutton -- tele back to town
  13. settingsbutton -- open the settings
  14. -- these all are just buttons that dispatch their respective actions to the player store
  15. with the exception of homebutton which just teleports the player to the fountain
  16. }
  17. versionLabel -- label that shows current version, clicking dispatches action to open changelog
  18. changelogWindow {
  19. versionLabel {
  20. header
  21. body
  22. }
  23. ...
  24. }
  25. inventoryWindow {
  26. navigationbar {
  27. hats
  28. faces
  29. tools
  30. abilities
  31. color
  32. material
  33. -- shows catagories of items that can be enabled/equipped
  34. }
  35. content {
  36. inventoryItemButton {
  37. thumbnail
  38. equipbutton
  39. }
  40. inventoryItemButton
  41. inventoryItemButton
  42. ...
  43. }
  44. }
  45. shopWindow {
  46. navigationbar {
  47. hats
  48. faces
  49. tools
  50. abilities
  51. color
  52. material
  53. -- shows catagories of items that can be bought
  54. }
  55. content {
  56. shopButton {
  57. thumbnail
  58. pricelabel
  59. buybutton
  60. }
  61. shopButton
  62. shopButton
  63. ...
  64. }
  65. }
  66. settingsWindow {
  67. musicVolumeSlider
  68. effectsVolumeSlider
  69. showNamesToggle
  70. keybinds { -- not shown on mobile, nothing to rebind
  71. keybindLabel {
  72. actionNameLabel
  73. currentBindingButton -- click to rebind, displays current binding
  74. }
  75. }
  76. }
  77. }
  78. }