📄 fstate.~pas
字号:
DDGold.SetImgIndex (FrmMain.WProgUse, 28);
DDGold.Left := 11;
DDGold.Top := 202-65;
d := FrmMain.WProgUse.Images[390]; //买进方
if d <> nil then begin
DDealRemoteDlg.Left := DDealDlg.Left - d.Width;
DDealRemoteDlg.Top := 0;
DDealRemoteDlg.SetImgIndex (FrmMain.WProgUse, 390);
end;
DDRGrid.Left := 21;
DDRGrid.Top := 56;
DDRGrid.Width := 36 * 5;
DDRGrid.Height := 33 * 2;
DDRGold.SetImgIndex (FrmMain.WProgUse, 28);
DDRGold.Left := 11;
DDRGold.Top := 202-65;
{-----------------------------------------------------------}
//行会
d := FrmMain.WProgUse.Images[180];
if d <> nil then begin
DGuildDlg.Left := 0;
DGuildDlg.Top := 0;
DGuildDlg.SetImgIndex (FrmMain.WProgUse, 180);
end;
DGDClose.Left := 584;
DGDClose.Top := 6;
DGDClose.SetImgIndex (FrmMain.WProgUse, 64);
DGDHome.Left := 13;
DGDHome.Top := 411;
DGDHome.SetImgIndex (FrmMain.WProgUse, 198);
DGDList.Left := 13;
DGDList.Top := 429;
DGDList.SetImgIndex (FrmMain.WProgUse, 200);
DGDChat.Left := 94;
DGDChat.Top := 429;
DGDChat.SetImgIndex (FrmMain.WProgUse, 190);
DGDAddMem.Left := 243;
DGDAddMem.Top := 411;
DGDAddMem.SetImgIndex (FrmMain.WProgUse, 182);
DGDDelMem.Left := 243;
DGDDelMem.Top := 429;
DGDDelMem.SetImgIndex (FrmMain.WProgUse, 192);
DGDEditNotice.Left := 325;
DGDEditNotice.Top := 411;
DGDEditNotice.SetImgIndex (FrmMain.WProgUse, 196);
DGDEditGrade.Left := 325;
DGDEditGrade.Top := 429;
DGDEditGrade.SetImgIndex (FrmMain.WProgUse, 194);
DGDAlly.Left := 407;
DGDAlly.Top := 411;
DGDAlly.SetImgIndex (FrmMain.WProgUse, 184);
DGDBreakAlly.Left := 407;
DGDBreakAlly.Top := 429;
DGDBreakAlly.SetImgIndex (FrmMain.WProgUse, 186);
DGDWar.Left := 529;
DGDWar.Top := 411;
DGDWar.SetImgIndex (FrmMain.WProgUse, 202);
DGDCancelWar.Left := 529;
DGDCancelWar.Top := 429;
DGDCancelWar.SetImgIndex (FrmMain.WProgUse, 188);
DGDUp.Left := 595;
DGDUp.Top := 239;
DGDUp.SetImgIndex (FrmMain.WProgUse, 373);
DGDDown.Left := 595;
DGDDown.Top := 291;
DGDDown.SetImgIndex (FrmMain.WProgUse, 372);
//行会通告编辑框
DGuildEditNotice.SetImgIndex (FrmMain.WProgUse, 204);
DGEOk.SetImgIndex (FrmMain.WProgUse, 361);
DGEOk.Left := 514;
DGEOk.Top := 287;
DGEClose.SetImgIndex (FrmMain.WProgUse, 64);
DGEClose.Left := 584;
DGEClose.Top := 6;
{-----------------------------------------------------------}
//属性调整对话框
DAdjustAbility.SetImgIndex (FrmMain.WProgUse, 226);
DAdjustAbilClose.SetImgIndex (FrmMain.WProgUse, 64);
DAdjustAbilClose.Left := 316;
DAdjustAbilClose.Top := 1;
DAdjustAbilOk.SetImgIndex (FrmMain.WProgUse, 62);
DAdjustAbilOk.Left := 220;
DAdjustAbilOk.Top := 298;
DPlusDC.SetImgIndex (FrmMain.WProgUse, 227); DPlusDC.Left := 217; DPlusDC.Top := 101;
DPlusMC.SetImgIndex (FrmMain.WProgUse, 227); DPlusMC.Left := 217; DPlusMC.Top := 121;
DPlusSC.SetImgIndex (FrmMain.WProgUse, 227); DPlusSC.Left := 217; DPlusSC.Top := 140;
DPlusAC.SetImgIndex (FrmMain.WProgUse, 227); DPlusAC.Left := 217; DPlusAC.Top := 160;
DPlusMAC.SetImgIndex (FrmMain.WProgUse, 227); DPlusMAC.Left := 217; DPlusMAC.Top := 181;
DPlusHP.SetImgIndex (FrmMain.WProgUse, 227); DPlusHP.Left := 217; DPlusHP.Top := 201;
DPlusMP.SetImgIndex (FrmMain.WProgUse, 227); DPlusMP.Left := 217; DPlusMP.Top := 220;
DPlusHit.SetImgIndex (FrmMain.WProgUse, 227); DPlusHit.Left := 217; DPlusHit.Top := 240;
DPlusSpeed.SetImgIndex (FrmMain.WProgUse, 227); DPlusSpeed.Left := 217; DPlusSpeed.Top := 261;
DMinusDC.SetImgIndex (FrmMain.WProgUse, 228); DMinusDC.Left := 227; DMinusDC.Top := 101;
DMinusMC.SetImgIndex (FrmMain.WProgUse, 228); DMinusMC.Left := 227; DMinusMC.Top := 121;
DMinusSC.SetImgIndex (FrmMain.WProgUse, 228); DMinusSC.Left := 227; DMinusSC.Top := 140;
DMinusAC.SetImgIndex (FrmMain.WProgUse, 228); DMinusAC.Left := 227; DMinusAC.Top := 160;
DMinusMAC.SetImgIndex (FrmMain.WProgUse, 228); DMinusMAC.Left := 227; DMinusMAC.Top := 181;
DMinusHP.SetImgIndex (FrmMain.WProgUse, 228); DMinusHP.Left := 227; DMinusHP.Top := 201;
DMinusMP.SetImgIndex (FrmMain.WProgUse, 228); DMinusMP.Left := 227; DMinusMP.Top := 220;
DMinusHit.SetImgIndex (FrmMain.WProgUse, 228); DMinusHit.Left := 227; DMinusHit.Top := 240;
DMinusSpeed.SetImgIndex (FrmMain.WProgUse, 228); DMinusSpeed.Left := 227; DMinusSpeed.Top := 261;
end;
{------------------------------------------------------------------------}
//打开/关闭我的属性对话框
procedure TFrmDlg.OpenMyStatus;
begin
DStateWin.Visible := not DStateWin.Visible;
PageChanged;
end;
//显示玩家信息对话框
procedure TFrmDlg.OpenUserState (ustate: TUserStateInfo);
begin
UserState1 := ustate;
DUserState1.Visible := TRUE;
end;
//显示/关闭物品对话框
procedure TFrmDlg.OpenItemBag;
begin
DItemBag.Visible := not DItemBag.Visible;
if DItemBag.Visible then
ArrangeItemBag;
end;
//底部状态框
procedure TFrmDlg.ViewBottomBox (visible: Boolean);
begin
DBottom.Visible := visible;
end;
// 取消物品移动
procedure TFrmDlg.CancelItemMoving;
var
idx, n: integer;
begin
if ItemMoving then begin
ItemMoving := FALSE;
idx := MovingItem.Index;
if idx < 0 then begin
if (idx <= -20) and (idx > -30) then begin
AddDealItem (MovingItem.Item);
end else begin
n := -(idx+1);
if n in [0..8] then begin
UseItems[n] := MovingItem.Item;
end;
end;
end else
if idx in [0..MAXBAGITEM-1] then begin
if ItemArr[idx].S.Name = '' then begin
ItemArr[idx] := MovingItem.Item;
end else begin
AddItemBag (MovingItem.Item);
end;
end;
MovingItem.Item.S.Name := '';
end;
ArrangeItemBag;
end;
//捞悼吝牢 酒捞袍阑 官蹿俊 冻绢 哆覆...
//啊规(骇飘)俊辑 滚赴巴父 龋免凳
//把移动的物品放下
procedure TFrmDlg.DropMovingItem;
var
idx: integer;
begin
if ItemMoving then begin
ItemMoving := FALSE;
if MovingItem.Item.S.Name <> '' then begin
FrmMain.SendDropItem (MovingItem.Item.S.Name, MovingItem.Item.MakeIndex);
AddDropItem (MovingItem.Item);
MovingItem.Item.S.Name := '';
end;
end;
end;
//打开属性调整对话框
procedure TFrmDlg.OpenAdjustAbility;
begin
DAdjustAbility.Left := 0;
DAdjustAbility.Top := 0;
SaveBonusPoint := BonusPoint;
FillChar (BonusAbilChg, sizeof(TNakedAbility), #0);
DAdjustAbility.Visible := TRUE;
end;
procedure TFrmDlg.DBackgroundBackgroundClick(Sender: TObject);
var
dropgold: integer;
valstr: string;
begin
if ItemMoving then begin
DBackground.WantReturn := TRUE;
if MovingItem.Item.S.Name = '金子' then begin
ItemMoving := FALSE;
MovingItem.Item.S.Name := '';
//倔付甫 滚副 扒瘤 拱绢夯促.
DialogSize := 1;
DMessageDlg ('你想放下多少金子?', [mbOk, mbAbort]);
GetValidStrVal (DlgEditText, valstr, [' ']);
dropgold := Str_ToInt (valstr, 0);
//
FrmMain.SendDropGold (dropgold);
end;
if MovingItem.Index >= 0 then //酒捞袍 啊规俊辑 滚赴巴父..
DropMovingItem;
end;
end;
procedure TFrmDlg.DBackgroundMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if ItemMoving then begin
DBackground.WantReturn := TRUE;
end;
end;
procedure TFrmDlg.DBottomMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
function ExtractUserName (line: string): string;
var
uname: string;
begin
GetValidStr3 (line, line, ['(', '!', '*', '/', ')']);
GetValidStr3 (line, uname, [' ', '=', ':']);
if uname <> '' then
if (uname[1] = '/') or (uname[1] = '(') or (uname[1] = ' ') or (uname[1] = '[') then
uname := '';
Result := uname;
end;
var
n: integer;
str: string;
begin
//盲泼芒俊 努腐窍搁, '/'庇加富 老锭 努腐茄 措拳甫 茄荤恩狼 捞抚捞 庇富措惑磊啊 登霸 茄促.
//当鼠标点在底部状态栏的消息上时,
if (X >= 208) and (X <= 208+374) and (Y >= SCREENHEIGHT-130) and (Y <= SCREENHEIGHT-130 + 12*9) then begin
n := DScreen.ChatBoardTop + (Y - (SCREENHEIGHT-130)) div 12;
if (n < DScreen.ChatStrs.Count) then begin
if not PlayScene.EdChat.Visible then begin
PlayScene.EdChat.Visible := TRUE;
PlayScene.EdChat.SetFocus;
end;
PlayScene.EdChat.Text := '/' + ExtractUserName (DScreen.ChatStrs[n]) + ' ';
PlayScene.EdChat.SelStart := Length(PlayScene.EdChat.Text);
PlayScene.EdChat.SelLength := 0;
end else
PlayScene.EdChat.Text := '';
end;
end;
{------------------------------------------------------------------------}
////皋技瘤 促捞倔肺弊 冠胶
////显示通用对话框
function TFrmDlg.DMessageDlg (msgstr: string; DlgButtons: TMsgDlgButtons): TModalResult;
const
XBase = 324;
var
lx, ly: integer;
d: TDirectDrawSurface;
begin
lx := XBase;
ly := 126;
case DialogSize of
0: //小对话框
begin
d := FrmMain.WProgUse.Images[381];
if d <> nil then begin
DMsgDlg.SetImgIndex (FrmMain.WProgUse, 381);
DMsgDlg.Left := (SCREENWIDTH - d.Width) div 2;
DMsgDlg.Top := (SCREENHEIGHT - d.Height) div 2;
msglx := 39;
msgly := 38;
lx := XBase;
ly := 126;
end;
end;
1: //大对话框(横)
begin
d := FrmMain.WProgUse.Images[360];
if d <> nil then begin
DMsgDlg.SetImgIndex (FrmMain.WProgUse, 360);
DMsgDlg.Left := (SCREENWIDTH - d.Width) div 2;
DMsgDlg.Top := (SCREENHEIGHT - d.Height) div 2;
msglx := 39;
msgly := 38;
lx := XBase;
ly := 126;
end;
end;
2: //大对话框(竖)
begin
d := FrmMain.WProgUse.Images[380];
if d <> nil then begin
DMsgDlg.SetImgIndex (FrmMain.WProgUse, 380);
DMsgDlg.Left := (SCREENWIDTH - d.Width) div 2;
DMsgDlg.Top := (SCREENHEIGHT - d.Height) div 2;
msglx := 23;
msgly := 20;
lx := 90;
ly := 305;
end;
end;
end;
MsgText := msgstr;
ViewDlgEdit := FALSE; //编辑框不可见
DMsgDlg.Floating := TRUE; //允许鼠标移动
DMsgDlgOk.Visible := FALSE;
DMsgDlgYes.Visible := FALSE;
DMsgDlgCancel.Visible := FALSE;
DMsgDlgNo.Visible := FALSE;
DMsgDlg.Left := (SCREENWIDTH - DMsgDlg.Width) div 2;
DMsgDlg.Top := (SCREENHEIGHT - DMsgDlg.Height) div 2;
//调整按钮
if mbCancel in DlgButtons then begin
DMsgDlgCancel.Left := lx;
DMsgDlgCancel.Top := ly;
DMsgDlgCancel.Visible := TRUE;
lx := lx - 110;
end;
if mbNo in DlgButtons then begin
DMsgDlgNo.Left := lx;
DMsgDlgNo.Top := ly;
DMsgDlgNo.Visible := TRUE;
lx := lx - 110;
end;
if mbYes in DlgButtons then begin
DMsgDlgYes.Left := lx;
DMsgDlgYes.Top := ly;
DMsgDlgYes.Visible := TRUE;
lx := lx - 110;
end;
if (mbOk in DlgButtons) or (lx = XBase) then begin
DMsgDlgOk.Left := lx;
DMsgDlgOk.Top := ly;
DMsgDlgOk.Visible := TRUE;
lx := lx - 110;
end;
HideAllControls;
DMsgDlg.ShowModal;
if mbAbort in DlgButtons then begin
ViewDlgEdit := TRUE; //显示编辑框.
DMsgDlg.Floating := FALSE;
with EdDlgEdit do begin
Text := '';
Width := DMsgDlg.Width - 70;
Left := (SCREENWIDTH - EdDlgEdit.Width) div 2;
Top := (SCREENHEIGHT - EdDlgEdit.Height) div 2 - 10;
end;
end;
Result := mrOk;
while TRUE do begin
if not DMsgDlg.Visible then break;
//FrmMain.DXTimerTimer (self, 0);
FrmMain.ProcOnIdle;
Application.ProcessMessages;
if Application.Terminated then exit;
end;
EdDlgEdit.Visible := FALSE;
RestoreHideControls;
DlgEditText := EdDlgEdit.Text;
if PlayScene.EdChat.Visible then PlayScene.EdChat.SetFocus;
ViewDlgEdit := FALSE;
Result := DMsgDlg.DialogResult;
DialogSize := 1; //扁夯惑怕
end;
procedure TFrmDlg.DMsgDlgOkClick(Sender: TObject; X, Y: Integer);
begin
if Sender = DMsgDlgOk then DMsgDlg.DialogResult := mrOk;
if Sender = DMsgDlgYes then DMsgDlg.DialogResult := mrYes;
if Sender = DMsgDlgCancel then DMsgDlg.DialogResult := mrCancel;
if Sender = DMsgDlgNo then DMsgDlg.DialogResult := mrNo;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -