Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

calculateListY()

Mammad900 edited this page Aug 29, 2020 · 1 revision

calculateListY(num)

Summary

This function helps you create a list of buttons in a page.

  1. num (int) : The zero-based index of the button (first button has an index of 0)

Returns

The Y position of the numth button

Examples

calculateListY(0) // Returns 20
calculateListY(1) // Returns 70
calculateListY(2) // Returns 120
calculateListY(3) // Returns 170

Source

int calculateListY(int num){
  return 20 + (num * 50); // This is configured for 20px top margin for list, 40px button height and 10px bottom margin for buttons
}
Clone this wiki locally