Move global_menu_* methods to a separate NativeMenu class.
This commit is contained in:
parent
a07dd0d6a5
commit
c65a667924
36 changed files with 3500 additions and 1738 deletions
|
|
@ -58,9 +58,13 @@ DisplayServerAndroid *DisplayServerAndroid::get_singleton() {
|
|||
|
||||
bool DisplayServerAndroid::has_feature(Feature p_feature) const {
|
||||
switch (p_feature) {
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
case FEATURE_GLOBAL_MENU: {
|
||||
return (native_menu && native_menu->has_feature(NativeMenu::FEATURE_GLOBAL_MENU));
|
||||
} break;
|
||||
#endif
|
||||
case FEATURE_CURSOR_SHAPE:
|
||||
//case FEATURE_CUSTOM_CURSOR_SHAPE:
|
||||
//case FEATURE_GLOBAL_MENU:
|
||||
//case FEATURE_HIDPI:
|
||||
//case FEATURE_ICON:
|
||||
//case FEATURE_IME:
|
||||
|
|
@ -578,6 +582,8 @@ DisplayServerAndroid::DisplayServerAndroid(const String &p_rendering_driver, Dis
|
|||
|
||||
keep_screen_on = GLOBAL_GET("display/window/energy_saving/keep_screen_on");
|
||||
|
||||
native_menu = memnew(NativeMenu);
|
||||
|
||||
#if defined(GLES3_ENABLED)
|
||||
if (rendering_driver == "opengl3") {
|
||||
RasterizerGLES3::make_current(false);
|
||||
|
|
@ -641,6 +647,11 @@ DisplayServerAndroid::DisplayServerAndroid(const String &p_rendering_driver, Dis
|
|||
}
|
||||
|
||||
DisplayServerAndroid::~DisplayServerAndroid() {
|
||||
if (native_menu) {
|
||||
memdelete(native_menu);
|
||||
native_menu = nullptr;
|
||||
}
|
||||
|
||||
#if defined(RD_ENABLED)
|
||||
if (rendering_device) {
|
||||
memdelete(rendering_device);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue