extracted toolbar flyout behaviour and added button to maingame ui