Refactorized calculation of X and Y coordinates for the text
Added custom angle when users inputs different numbers of button