I spent 3 months (working for several hours a day) trying to disassemble how the UI work and creating a hook that could successfully emulate the UI. It's not easy to do and will sap a lot of your soul trying to do it. However, now that I've got it working, implementing buttons and such is fairly easy. The only thing that is still fairly mysterious to me (hard to understand) is how FL handles UI positional data - there is very little consistency from what I can tell.