mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-23 11:43:26 +00:00
Fixed Alert and MessageBox on windows to work with non-english characters
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -128,9 +128,10 @@ function messageBox()
|
|||||||
case 'ALERT':
|
case 'ALERT':
|
||||||
this.GM = require('_GenericMarshal');
|
this.GM = require('_GenericMarshal');
|
||||||
this.user32 = this.GM.CreateNativeProxy('user32.dll');
|
this.user32 = this.GM.CreateNativeProxy('user32.dll');
|
||||||
this.user32.CreateMethod('MessageBoxA');
|
this.user32.CreateMethod('MessageBoxW');
|
||||||
|
|
||||||
layout = msg.command == 'YESNO' ? (MB_YESNO | MB_DEFBUTTON2 | MB_ICONEXCLAMATION | MB_TOPMOST | MB_SYSTEMMODAL) : (MB_OK | MB_DEFBUTTON2 | MB_ICONEXCLAMATION | MB_TOPMOST | MB_SYSTEMMODAL);
|
layout = msg.command == 'YESNO' ? (MB_YESNO | MB_DEFBUTTON2 | MB_ICONEXCLAMATION | MB_TOPMOST | MB_SYSTEMMODAL) : (MB_OK | MB_DEFBUTTON2 | MB_ICONEXCLAMATION | MB_TOPMOST | MB_SYSTEMMODAL);
|
||||||
this.user32.MessageBoxA.async(0, this.GM.CreateVariable(msg.caption), this.GM.CreateVariable(msg.title), layout)
|
this.user32.MessageBoxW.async(0, this.GM.CreateVariable(msg.caption, { wide: true }), this.GM.CreateVariable(msg.title, { wide: true }), layout)
|
||||||
.then(function (r)
|
.then(function (r)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in New Issue
Block a user