📄 gamemodel.pas
字号:
unit gamemodel;
interface
uses SysUtils,windows,model;
type
tgamemodel=class(Tmodel)
private
public
procedure process(params:string);override;
end;
implementation
uses shareunit,constunt,udpcores,structureunt;
//------------------------------------------------------------------------------
// 处理所有game有关的消息
//------------------------------------------------------------------------------
procedure tgamemodel.process(params:string);
var funid,msg:string;
begin
funid:=getparamitem(params,'funid');
case strtointdef(funid,xy_unknow) of
xy_request:
begin
msg:='';
makeparamsex(msg,'msgid',xy_showpromptform);
makeparamsex(msg,'msgtext','游戏邀请');
makeparamsex(msg,'paramsex',params);
expandmemo.add(msg);
postmessage(main_hwnd,refresh_status,xy_showpromptform,0);
end;
xy_refuseing:
begin
msg:='';
makeparamsex(msg,'msgid',xy_showadmsgform);
makeparamsex(msg,'msgtext',getparamitem(params,'uname')+' 拒绝游戏邀请!');
makeparamsex(msg,'autoclose',true);
expandmemo.add(msg);
postmessage(main_hwnd,refresh_status,xy_showadmsgform,0);
end;
xy_unknow:logmemo.add('unknow:'+params);
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -