⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fbottom.pas

📁 千年源代码,只缺少控件,可以做二次开发用,好不容易得来的
💻 PAS
📖 第 1 页 / 共 2 页
字号:
   FrmMDCcanvas.Handle := FrmMDC;
   Bitmap.Canvas.CopyRect(FrmMRect, FrmMDCcanvas, FrmMRect);
   ReleaseDC(FrmM.Handle, FrmMDC);
   FrmMDCcanvas.Free;
end;

procedure TFrmBottom.ClientCapture;
var
   abitmap : TBitmap;
   CIBfile : TCIBfile;
   str : string;
begin
   CIBfile := TCIBfile.Create;
   abitmap := TBitmap.Create;
   capture (abitmap);
   if DirExists('.\capture') then else Mkdir('.\' + 'capture');
   str := SaveFileName;
   aBitMap.SaveToFile ('.\capture\'+str+'.bmp');
   CIBfile.saveToFile ('.\capture\'+str+'.cib', CharCenterName+' '+Map.GetMapName, ReConnectIpAddr, abitmap, SaveChatList);
   CIBfile.Free;
   abitmap.Free;
   AddChat (Conv( '拳搁阑 母媚沁嚼聪促. 颇老(' ) + str +')', $FFFF, 0);
end;

var
   LbChatClickFlag : Boolean = TRUE;

/////////////////////////////// LbChat events //////////////////////////////////
procedure TFrmBottom.LbChatClick(Sender: TObject);
begin
   Sleep (300);
   if LbChatClickFlag then boShowChat := not boShowChat;
end;

procedure TFrmBottom.LbChatDblClick(Sender: TObject);
{
var
   idx : integer;
   str, rdstr : string;
}
begin
{ // 快急阜酒初澜
   boShowChat := not boShowChat;
   LbChatClickFlag := FALSE;
   idx := TListBox(Sender).itemindex;
   if (idx > -1) and (idx < 4) then begin
      str := LbChat.Items[idx];
      str := GetValidStr3 (str, rdstr, ':');
      EdChat.Text := str;
   end;
   LbChatClickFlag := TRUE;
}
end;

procedure TFrmBottom.LBChatDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
var
   col : integer;
   fcol, bcol, r, g, b: word;
begin
   col := Integer (LbChat.Items.Objects [Index]);

   fcol := LOWORD (Col);
   bcol := HIWORD (col);

   WinVRGB (bcol, r, g, b);
   r := r * 8;
   g := g * 8;
   b := b * 8;
   LbChat.Canvas.Brush.Color := RGB(r, g, b);
   LBChat.Canvas.FillRect (Rect);

   WinVRGB (fcol, r, g, b);
   r := r * 8;
   g := g * 8;
   b := b * 8;
   LbChat.Canvas.Font.Color := RGB (r, g, b);
   LBChat.Canvas.TextOut (Rect.left, Rect.top, LbChat.Items[Index]);
end;

procedure TFrmBottom.LbChatMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
   EdChat.SetFocus;
   { 付快胶 坷弗率荤侩栏肺 汗荤
   tempPoint:= Point (x, y);
   if Button = mbRight then begin
      idx := LbChat.ItemAtPos (tempPoint, FALSE);
      EdChat.Text := LbChat.Items[idx];
   end;
   }
end;
/////////////////////////////// EdChat events //////////////////////////////////
procedure TFrmBottom.EdChatEnter(Sender: TObject);
begin
   SetImeMode (EdChat.Handle, 1);
end;


procedure TFrmBottom.EdChatKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
const
   KeyDownTick : DWORD = 0;
var
   Cl : TCharClass;
   cKey : TCKey;
   i, cnt : integer;
   str : string;
   cSay : TCSay;
   StringList : TStringList;
begin
   if (ssAlt in Shift) and (Key=word('M')) then begin  // Exit
      if Map.GetMapName <> 'south.map' then exit;
      FrmSearchUser.Visible := not FrmSearchUser.Visible;
   end;

   if (ssAlt in Shift) and (Key=word('X')) then begin  // Exit
      CloseFlag := TRUE;
      FrmLogOn.SocketDisConnect ('','',TRUE);
      exit;
   end;

   if (ssAlt in Shift) and (Key=VK_RETURN) then begin  // Screnn Mode Change
      if (NATION_VERSION = NATION_TAIWAN) or (NATION_VERSION = NATION_CHINA_1) then exit;
      FrmM.SaveAndDeleteAllA2Form;
      FrmM.DXDraw.Finalize;
      if doFullScreen in FrmM.DXDraw.Options then begin
         FrmM.BorderStyle := bsSingle;
         FrmM.ClientWidth := 640;
         FrmM.ClientHeight := 480;
         FrmM.DXDraw.Options := FrmM.DXDraw.Options - [doFullScreen];
      end else begin
         FrmM.BorderStyle := bsNone;
         FrmM.ClientWidth := 640;
         FrmM.ClientHeight := 480;
         FrmM.DXDraw.Options := FrmM.DXDraw.Options + [doFullScreen];
      end;
      FrmM.DXDraw.Initialize;
      FrmM.RestoreAndAddAllA2Form;
      exit;
   end;

   if (key = VK_RETURN) and (EdChat.Text <> '') then begin // Send SayData
      cSay.rmsg := CM_SAY;
      str := EdChat.Text;
      SetWordString (cSay.rWordString, str);
      cnt := sizeof(cSay) - sizeof(TWordString) + SizeOfWordString (cSay.rWordString);
      FrmLogon.SocketAddData (cnt, @csay);
   end;

   if (key = VK_RETURN) or (key = VK_ESCAPE) then begin  // EdChat.Text Clear
      EdChat.Text := '';
      exit;
   end;

   Keyshift := Shift;

   if mmAnsTick < integer(KeyDownTick)+25 then exit;
   KeyDownTick := mmAnsTick;

   case key of
      VK_F1  :
         begin
            if FileExists ('ect\help.txt') then begin
               StringList := TStringList.Create;
               StringList.LoadFromFile ('ect\help.txt');
               for i := 0 to StringList.Count -1 do
                  FrmM.AddChat (StringList[i], $FFFF, 0);
               boShowChat := TRUE;
               StringList.Free;
            end else begin
               AddChat ('Can not Open File [ect\help.txt]', $FFFF, 0);
            end;
         end;
      VK_F5  :
            if not (savekeyBool) then FrmAttrib.savekeyaction ('F5');
      VK_F6  :
            if not (savekeyBool) then FrmAttrib.savekeyaction ('F6');
      VK_F7  :
            if not (savekeyBool) then FrmAttrib.savekeyaction ('F7');
      VK_F8  :
            if not (savekeyBool) then FrmAttrib.savekeyaction ('F8');
      VK_F9  :
            if not (savekeyBool) then FrmAttrib.savekeyaction ('F9');
      VK_F10  :
            if not (savekeyBool) then FrmAttrib.savekeyaction ('F10');
      VK_F11  :
            if not (savekeyBool) then FrmAttrib.savekeyaction ('F11');
      VK_F12  :
            if not (savekeyBool) then FrmAttrib.savekeyaction ('F12');
      else begin
         if key in [VK_F2,VK_F3,VK_F4] then begin
            ckey.rmsg := CM_KEYDOWN;
            ckey.rkey := key;
            FrmLogon.SocketAddData (sizeof(Ckey), @Ckey);
         end;
         Cl := CharList.GetChar (CharCenterId);
         if Cl = nil then exit;
         if Cl.AllowAddAction = FALSE then exit;

         case key of
            VK_F4 : CL.ProcessMessage (SM_MOTION, cl.dir, cl.x, cl.y, cl.feature, AM_HELLO);
         end;
      end;
      EdChat.SetFocus;
   end;
end;

procedure TFrmBottom.EdChatKeyPress(Sender: TObject; var Key: Char);
begin
   if (key = char (VK_ESCAPE)) or (key = char(VK_RETURN)) then key := char(0);
end;

procedure TFrmBottom.EdChatKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
   Keyshift := Shift;
end;

procedure TFrmBottom.ListBoxUsedMagicEnter(Sender: TObject);
begin
   EdChat.SetFocus;
   boShowChat := not boShowChat;
end;

procedure TFrmBottom.BtnItemClick(Sender: TObject);
begin
   savekeyBool := FALSE; // FAttrib狼 savekey 阜澜
   FrmAttrib.Visible := TRUE;
   FrmAttrib.LbWindowName.Caption := Conv('酒捞袍');
   FrmAttrib.LbMoney.Caption := Conv('酒捞袍');
   FrmAttrib.PanelItem.Visible := TRUE;
   FrmAttrib.PanelMagic.Visible := FALSE;
   FrmAttrib.PanelAttrib.Visible := FALSE;
   FrmAttrib.PanelBasic.Visible := FALSE;
   FrmAttrib.PanelSkill.Visible := FALSE;
end;

procedure TFrmBottom.BtnMagicClick(Sender: TObject);
begin
   savekeyBool := FALSE; // FAttrib狼 savekey 阜澜
   FrmAttrib.Visible := TRUE;
   FrmAttrib.LbWindowName.Caption := Conv('公傍');
   FrmAttrib.LbMoney.Caption := Conv('公傍');
   FrmAttrib.PanelMagic.Visible := TRUE;
   FrmAttrib.PanelItem.Visible := FALSE;
   FrmAttrib.PanelAttrib.Visible := FALSE;
   FrmAttrib.PanelBasic.Visible := FALSE;
   FrmAttrib.PanelSkill.Visible := FALSE;
end;

procedure TFrmBottom.BtnDefMagicClick(Sender: TObject);
begin
   savekeyBool := FALSE; // FAttrib狼 savekey 阜澜
   FrmAttrib.Visible := TRUE;
   FrmAttrib.LbWindowName.Caption := Conv('扁夯公傍');
   FrmAttrib.LbMoney.Caption := Conv('扁夯公傍');
   FrmAttrib.PanelBasic.Visible := TRUE;
   FrmAttrib.PanelAttrib.Visible := FALSE;
   FrmAttrib.PanelMagic.Visible := FALSE;
   FrmAttrib.PanelItem.Visible := FALSE;
   FrmAttrib.PanelSkill.Visible := FALSE;
end;

procedure TFrmBottom.BtnAttribClick(Sender: TObject);
begin
   savekeyBool := FALSE; // FAttrib狼 savekey 阜澜
   FrmAttrib.Visible := TRUE;
   FrmAttrib.LbWindowName.Caption := Conv('加己');
   FrmAttrib.LbMoney.Caption := Conv('加己');
   FrmAttrib.PanelAttrib.Visible := TRUE;
   FrmAttrib.PanelMagic.Visible := FALSE;
   FrmAttrib.PanelItem.Visible := FALSE;
   FrmAttrib.PanelBasic.Visible := FALSE;
   FrmAttrib.PanelSkill.Visible := FALSE;
end;

procedure TFrmBottom.BtnSkillClick(Sender: TObject);
begin
   savekeyBool := FALSE; // FAttrib狼 savekey 阜澜
   FrmAttrib.Visible := TRUE;
   FrmAttrib.LbWindowName.Caption := Conv('扁贱');
   FrmAttrib.LbMoney.Caption := Conv('扁贱');
   FrmAttrib.PanelSkill.Visible := TRUE;
   FrmAttrib.PanelAttrib.Visible := FALSE;
   FrmAttrib.PanelMagic.Visible := FALSE;
   FrmAttrib.PanelItem.Visible := FALSE;
   FrmAttrib.PanelBasic.Visible := FALSE;
end;

procedure TFrmBottom.BtnItemMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
   MouseInfoStr := TSpeedButton (Sender).Hint;
end;

procedure TFrmBottom.BtnWAttribClick(Sender: TObject);
begin
   if FrmSearchUser.Visible then FrmSearchUser.Visible := FALSE;
   FrmAttrib.Visible := not FrmAttrib.Visible;
//   if FrmNpcView.Visible then FrmNpcView.SetPostion;
//   if FrmItemStoreView.Visible then FrmItemStoreView.SetPostion;
//   if FrmQView.Visible then FrmQView.SetPostion;

//   if FrmcMessageBox.Visible then FrmcMessageBox.SetPostion;
//   if FrmMunpaCreate.Visible then FrmMunpaCreate.SetPostion;
//   if FrmMunpaimpo.Visible then FrmMunpaimpo.SetPostion;
end;

procedure TFrmBottom.BtnSelMagicClick(Sender: TObject);
begin
   FrmSound.Visible := not FrmSound.Visible; // option芒
//   FrmSelMagic.Visible := not FrmSelMagic.Visible;
end;

procedure TFrmBottom.ListboxUsedMagicDblClick(Sender: TObject);
begin
//   EdChat.SetFocus;
end;

procedure TFrmBottom.LbChatEnter(Sender: TObject);
begin
   LbChat.OnClick (nil);
   EdChat.SetFocus;
end;

procedure TFrmBottom.Timer1Timer(Sender: TObject);
//var i : integer;
begin
{
   if PgLife.Progress < (PgLife.MaxValue * 20 div 100) then begin
      FrmAttrib.ILabels[1].OnDblClick(Self);
   end;
   if PGInPower.Progress < (PGInPower.MaxValue * 10 div 100) then begin
      for i := 0 to 1 do begin
         FrmAttrib.A2ILabel0.OnDblClick (Self);
      end;
   end;
   if PgOutPower.Progress < (PgOutPower.MaxValue * 10 div 100) then begin
      for i := 0 to 1 do begin
         FrmAttrib.A2ILabel0.OnDblClick (Self);
      end;
   end;
}
end;


end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -