MCPcopy Create free account
hub / github.com/axmolengine/axmol / setFullScreenEnabled

Method setFullScreenEnabled

core/ui/UIMediaPlayer.cpp:1213–1225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1211}
1212
1213void MediaPlayer::setFullScreenEnabled(bool enabled)
1214{
1215 if (_fullScreenEnabled != enabled)
1216 {
1217 _fullScreenEnabled = enabled;
1218
1219 auto pvd = reinterpret_cast<PrivateVideoDescriptor*>(_videoContext);
1220 const auto contentSize = enabled ? _director->getRenderView()->getDesignResolutionSize() : pvd->_originalViewSize;
1221 Widget::setContentSize(contentSize);
1222
1223 sendEvent((int)EventType::FULLSCREEN_SWITCH);
1224 }
1225}
1226
1227bool MediaPlayer::isFullScreenEnabled() const
1228{

Calls 1

sendEventFunction · 0.85

Tested by 1