Advertisement
Guest User

Untitled

a guest
Jun 24th, 2023
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. <window id="13001">
  2. <controls>
  3. <!-- #region TEMPORARY ALL SPORTS LABEL -->
  4. <control type="label" id="allsportstemplabel">
  5. <left>0</left>
  6. <top>30</top>
  7. <width>100%</width>
  8. <height>0</height>
  9. <visible>true</visible>
  10. <align>center</align>
  11. <label>All Sports Page</label>
  12. <font>arial.ttf</font>
  13. </control>
  14. <!-- #endregion -->
  15.  
  16. <!-- All Sports Grid -->
  17. <control type="grid">
  18. <!-- Define properties of the grid -->
  19. <columns>4</columns> <!-- Number of columns in the grid -->
  20. <rows>3</rows> <!-- Number of rows in the grid -->
  21. <colwidth>300</colwidth> <!-- Width of each column -->
  22. <rowheight>300</rowheight> <!-- Height of each row -->
  23. <colspacing>20</colspacing> <!-- Spacing between columns -->
  24. <rowspacing>20</rowspacing> <!-- Spacing between rows -->
  25.  
  26. <!-- Add buttons for each sport dynamically using a loop -->
  27. <loop condition="sports">
  28. <control type="button">
  29. <!-- Position of the button in the grid -->
  30. <pos>(loop.index-1)%3, (loop.index-1)//3</pos>
  31. <!-- Size of the button -->
  32. <width>300</width>
  33. <height>300</height>
  34. <!-- Other properties of the button -->
  35. <label>$(INFO[sports].name)</label> <!-- Label for the sport -->
  36. <texture>$(INFO[sports].icon)</texture> <!-- Icon for the sport -->
  37. <!-- Event handler for button click -->
  38. <onclick>RunScript(special://path/to/OnClickScript.py, show_sport_details, '$(INFO[sports].name)')</onclick>
  39. </control>
  40. </loop>
  41. </control>
  42. </controls>
  43. </window>
  44.  
  45.  
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement