@@ -256,7 +256,7 @@ int NativeMenuWindows::add_submenu_item(const RID &p_rid, const String &p_label,
256
256
item.fType = MFT_STRING;
257
257
item.hSubMenu = md_sub->menu ;
258
258
item.dwItemData = (ULONG_PTR)item_data;
259
- item.dwTypeData = (LPWSTR)label.ptrw ();
259
+ item.dwTypeData = (LPWSTR)label.get_data ();
260
260
261
261
if (!InsertMenuItemW (md->menu , p_index, true , &item)) {
262
262
memdelete (item_data);
@@ -289,7 +289,7 @@ int NativeMenuWindows::add_item(const RID &p_rid, const String &p_label, const C
289
289
item.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_DATA;
290
290
item.fType = MFT_STRING;
291
291
item.dwItemData = (ULONG_PTR)item_data;
292
- item.dwTypeData = label. ptrw () ? ( LPWSTR)label.ptrw () : L" " ;
292
+ item.dwTypeData = ( LPWSTR)label.get_data () ;
293
293
294
294
if (!InsertMenuItemW (md->menu , p_index, true , &item)) {
295
295
memdelete (item_data);
@@ -322,7 +322,7 @@ int NativeMenuWindows::add_check_item(const RID &p_rid, const String &p_label, c
322
322
item.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_DATA;
323
323
item.fType = MFT_STRING;
324
324
item.dwItemData = (ULONG_PTR)item_data;
325
- item.dwTypeData = (LPWSTR)label.ptrw ();
325
+ item.dwTypeData = (LPWSTR)label.get_data ();
326
326
327
327
if (!InsertMenuItemW (md->menu , p_index, true , &item)) {
328
328
memdelete (item_data);
@@ -361,7 +361,7 @@ int NativeMenuWindows::add_icon_item(const RID &p_rid, const Ref<Texture2D> &p_i
361
361
item.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_DATA | MIIM_BITMAP;
362
362
item.fType = MFT_STRING;
363
363
item.dwItemData = (ULONG_PTR)item_data;
364
- item.dwTypeData = (LPWSTR)label.ptrw ();
364
+ item.dwTypeData = (LPWSTR)label.get_data ();
365
365
item.hbmpItem = item_data->bmp ;
366
366
367
367
if (!InsertMenuItemW (md->menu , p_index, true , &item)) {
@@ -401,7 +401,7 @@ int NativeMenuWindows::add_icon_check_item(const RID &p_rid, const Ref<Texture2D
401
401
item.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_DATA | MIIM_BITMAP;
402
402
item.fType = MFT_STRING;
403
403
item.dwItemData = (ULONG_PTR)item_data;
404
- item.dwTypeData = (LPWSTR)label.ptrw ();
404
+ item.dwTypeData = (LPWSTR)label.get_data ();
405
405
item.hbmpItem = item_data->bmp ;
406
406
407
407
if (!InsertMenuItemW (md->menu , p_index, true , &item)) {
@@ -435,7 +435,7 @@ int NativeMenuWindows::add_radio_check_item(const RID &p_rid, const String &p_la
435
435
item.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_DATA;
436
436
item.fType = MFT_STRING | MFT_RADIOCHECK;
437
437
item.dwItemData = (ULONG_PTR)item_data;
438
- item.dwTypeData = (LPWSTR)label.ptrw ();
438
+ item.dwTypeData = (LPWSTR)label.get_data ();
439
439
440
440
if (!InsertMenuItemW (md->menu , p_index, true , &item)) {
441
441
memdelete (item_data);
@@ -474,7 +474,7 @@ int NativeMenuWindows::add_icon_radio_check_item(const RID &p_rid, const Ref<Tex
474
474
item.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_DATA | MIIM_BITMAP;
475
475
item.fType = MFT_STRING | MFT_RADIOCHECK;
476
476
item.dwItemData = (ULONG_PTR)item_data;
477
- item.dwTypeData = (LPWSTR)label.ptrw ();
477
+ item.dwTypeData = (LPWSTR)label.get_data ();
478
478
item.hbmpItem = item_data->bmp ;
479
479
480
480
if (!InsertMenuItemW (md->menu , p_index, true , &item)) {
@@ -508,7 +508,7 @@ int NativeMenuWindows::add_multistate_item(const RID &p_rid, const String &p_lab
508
508
item.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_DATA;
509
509
item.fType = MFT_STRING;
510
510
item.dwItemData = (ULONG_PTR)item_data;
511
- item.dwTypeData = (LPWSTR)label.ptrw ();
511
+ item.dwTypeData = (LPWSTR)label.get_data ();
512
512
513
513
if (!InsertMenuItemW (md->menu , p_index, true , &item)) {
514
514
memdelete (item_data);
@@ -949,7 +949,7 @@ void NativeMenuWindows::set_item_text(const RID &p_rid, int p_idx, const String
949
949
item.cbSize = sizeof (item);
950
950
item.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_DATA;
951
951
if (GetMenuItemInfoW (md->menu , p_idx, true , &item)) {
952
- item.dwTypeData = label. ptrw () ? ( LPWSTR)label.ptrw () : L" " ;
952
+ item.dwTypeData = ( LPWSTR)label.get_data () ;
953
953
SetMenuItemInfoW (md->menu , p_idx, true , &item);
954
954
}
955
955
}
0 commit comments