Widget Function - Get Value

Hello, I’m currently working on a menu system that can be controlled with key presses. I currently have the following set up for each of my menu options - to highlight the currently selected menu option. However, if I could figure out how to reference the current text object in my widget, I could have only one instance of this function, rather than one for each menu option. Any help would be greatly appreciated!