Which button did you mean? Shutdown/reboot option or the toggles in systemui?
If you mean the shutdown, reboot, etc. options, it's a framework and android-policy modifications.
I don't know how, I just try to compare some smali code, ids, strings, drawables, and else, then replace "here and...