Merge of new UI code for transitions and states

Several fixes and overhaul of the transition drawing code.
Simple event animation added for demo purposes.