Explicitly cast to float in ui_shared to prevent ambiguous overloaded function call error on MSVC