first of all I let you know that i am aware that the best way to implement a button is by using a digital Input. Unfortunately in my project all digital Pins on my board are used and I need to use some of the open analog inputs for my needed buttons.
Now my question: What is the best way to connect the buttons to the analog pins? (which resistors should I use etc.). And what is the best way to get the actual press-state in the loop-function?
The analog inputs on Uno, Nano*, Mega, and the like, are digital pins with analog input as a special function. Use them like any other digital pins including internal pullups.