moved render functions to ui.cpp