mirror of
https://github.com/paleotronic/microm8-gui.git
synced 2025-02-20 07:28:55 +00:00
send osd messages
This commit is contained in:
parent
6e8807ccbb
commit
3c03c55dce
@ -1,7 +1,7 @@
|
||||
object GUIForm: TGUIForm
|
||||
Left = 2087
|
||||
Left = 102
|
||||
Height = 668
|
||||
Top = 207
|
||||
Top = 82
|
||||
Width = 1014
|
||||
AlphaBlendValue = 128
|
||||
Caption = 'microM8 GUI'
|
||||
|
@ -532,6 +532,7 @@ type
|
||||
function IsMouseBtnDown: Boolean;
|
||||
function IsMicroM8Active: boolean;
|
||||
procedure WaitReposTimer(Sender: TObject);
|
||||
procedure SendOSDMessage(msg: string);
|
||||
private
|
||||
lx, ly, lw, lh: integer;
|
||||
lastShowTime: TDateTime;
|
||||
@ -2741,6 +2742,13 @@ begin
|
||||
//log.Lines.Add('mouse button up at '+IntToStr(x)+', '+IntToStr(y));
|
||||
end;
|
||||
|
||||
procedure TGUIForm.SendOSDMessage(msg: string);
|
||||
var
|
||||
Respo: TStringStream;
|
||||
begin
|
||||
SimpleFormPost( baseUrl+'/api/control/osd/send', msg, Respo);
|
||||
end;
|
||||
|
||||
procedure TGUIForm.FormResize(Sender: TObject);
|
||||
var
|
||||
h: double;
|
||||
@ -2802,8 +2810,9 @@ begin
|
||||
'0': begin
|
||||
UpdateConfig('video/current.fullscreen', '1', false);
|
||||
isFS := true;
|
||||
SendOSDMessage('Alt/Option Enter to leave fullscreen');
|
||||
end;
|
||||
'1': begin:
|
||||
'1': begin
|
||||
UpdateConfig('video/current.fullscreen', '0', false);
|
||||
isFS := false;
|
||||
end;
|
||||
|
@ -1,7 +1,7 @@
|
||||
object GUIForm: TGUIForm
|
||||
Left = 2087
|
||||
Left = 102
|
||||
Height = 668
|
||||
Top = 207
|
||||
Top = 82
|
||||
Width = 1014
|
||||
AlphaBlendValue = 128
|
||||
Caption = 'microM8 GUI'
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
4
main.lfm
4
main.lfm
@ -1,7 +1,7 @@
|
||||
object GUIForm: TGUIForm
|
||||
Left = 2087
|
||||
Left = 102
|
||||
Height = 668
|
||||
Top = 207
|
||||
Top = 82
|
||||
Width = 1014
|
||||
AlphaBlendValue = 128
|
||||
Caption = 'microM8 GUI'
|
||||
|
10
main.pas
10
main.pas
@ -532,6 +532,7 @@ type
|
||||
function IsMouseBtnDown: Boolean;
|
||||
function IsMicroM8Active: boolean;
|
||||
procedure WaitReposTimer(Sender: TObject);
|
||||
procedure SendOSDMessage(msg: string);
|
||||
private
|
||||
lx, ly, lw, lh: integer;
|
||||
lastShowTime: TDateTime;
|
||||
@ -751,6 +752,7 @@ begin
|
||||
end;
|
||||
2: begin
|
||||
SimpleGet(baseUrl + '/api/control/hardware/disk/swap');
|
||||
SendOSDMessage('Swapped disks in Drive 1 & 2');
|
||||
end;
|
||||
|
||||
3: begin
|
||||
@ -2741,6 +2743,13 @@ begin
|
||||
//log.Lines.Add('mouse button up at '+IntToStr(x)+', '+IntToStr(y));
|
||||
end;
|
||||
|
||||
procedure TGUIForm.SendOSDMessage(msg: string);
|
||||
var
|
||||
Respo: TStringStream;
|
||||
begin
|
||||
SimpleFormPost( baseUrl+'/api/control/osd/send', msg, Respo);
|
||||
end;
|
||||
|
||||
procedure TGUIForm.FormResize(Sender: TObject);
|
||||
var
|
||||
h: double;
|
||||
@ -2802,6 +2811,7 @@ begin
|
||||
'0': begin
|
||||
UpdateConfig('video/current.fullscreen', '1', false);
|
||||
isFS := true;
|
||||
SendOSDMessage('Alt/Option Enter to leave fullscreen');
|
||||
end;
|
||||
'1': begin
|
||||
UpdateConfig('video/current.fullscreen', '0', false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user