1
1
Fork 0
mirror of https://github.com/FellippeHeitor/InForm.git synced 2025-01-15 03:49:56 +00:00

Properly displays a Wait message while relaunching the preview.

This commit is contained in:
FellippeHeitor 2018-06-11 02:14:00 -03:00
parent dc870e19bf
commit 7c40916bf9
2 changed files with 17 additions and 4 deletions

View file

@ -1395,15 +1395,15 @@ SUB __UI_UpdateDisplay
_PRINTMODE _KEEPBACKGROUND _PRINTMODE _KEEPBACKGROUND
NoInputMessage$ = "Please wait..." NoInputMessage$ = "Please wait..."
COLOR _RGB32(0, 0, 0) COLOR _RGB32(0, 0, 0)
__UI_PrintString _WIDTH / 2 - __UI_PrintWidth(NoInputMessage$) / 2 + 1, _HEIGHT \ 2 - _FONTWIDTH + 1, NoInputMessage$ __UI_PrintString _WIDTH / 2 - __UI_PrintWidth(NoInputMessage$) / 2 + 1, _HEIGHT \ 2 - uspacing + 1, NoInputMessage$
COLOR _RGB32(255, 255, 255) COLOR _RGB32(255, 255, 255)
__UI_PrintString _WIDTH / 2 - __UI_PrintWidth(NoInputMessage$) / 2, _HEIGHT \ 2 - _FONTWIDTH, NoInputMessage$ __UI_PrintString _WIDTH / 2 - __UI_PrintWidth(NoInputMessage$) / 2, _HEIGHT \ 2 - uspacing, NoInputMessage$
IF LEN(__UI_WaitMessage) > 0 THEN IF LEN(__UI_WaitMessage) > 0 THEN
IF LEFT$(__UI_WaitMessage, 1) <> "(" THEN __UI_WaitMessage = "(" + __UI_WaitMessage + ")" IF LEFT$(__UI_WaitMessage, 1) <> "(" THEN __UI_WaitMessage = "(" + __UI_WaitMessage + ")"
COLOR _RGB32(0, 0, 0) COLOR _RGB32(0, 0, 0)
__UI_PrintString _WIDTH / 2 - __UI_PrintWidth(NoInputMessage$) / 2 + 1, _HEIGHT \ 2 + 4, __UI_WaitMessage __UI_PrintString _WIDTH / 2 - __UI_PrintWidth(__UI_WaitMessage) / 2 + 1, _HEIGHT \ 2 + uspacing + 1, __UI_WaitMessage
COLOR _RGB32(255, 255, 255) COLOR _RGB32(255, 255, 255)
__UI_PrintString _WIDTH / 2 - __UI_PrintWidth(NoInputMessage$) / 2, _HEIGHT \ 2 + 3, __UI_WaitMessage __UI_PrintString _WIDTH / 2 - __UI_PrintWidth(__UI_WaitMessage) / 2, _HEIGHT \ 2 + uspacing, __UI_WaitMessage
END IF END IF
_DEST PrevDest _DEST PrevDest
__UI_MakeHardwareImage __UI_WaitMessageHandle __UI_MakeHardwareImage __UI_WaitMessageHandle

View file

@ -3077,6 +3077,8 @@ SUB CheckPreview
CLOSE Client CLOSE Client
Client = 0 Client = 0
__UI_UpdateDisplay
SHELL _DONTWAIT ".\InForm\UiEditorPreview.exe " + HostPort SHELL _DONTWAIT ".\InForm\UiEditorPreview.exe " + HostPort
DO DO
@ -3114,6 +3116,8 @@ SUB CheckPreview
CLOSE Client CLOSE Client
Client = 0 Client = 0
__UI_UpdateDisplay
SHELL _DONTWAIT "./InForm/UiEditorPreview " + HostPort SHELL _DONTWAIT "./InForm/UiEditorPreview " + HostPort
DO DO
@ -3126,6 +3130,15 @@ SUB CheckPreview
Handshake Handshake
IF LEN(LastFormData$) THEN
b$ = "RESTORECRASH>" + LastFormData$ + "<END>"
PUT #Client, , b$
prevScreenX = -1
prevScreenY = -1
UndoPointer = 0
TotalUndoImages = 0
END IF
TIMER(__UI_EventsTimer) ON TIMER(__UI_EventsTimer) ON
ELSE ELSE
'Preview is active. 'Preview is active.