procedure TfrmSender.cbxTargetGhostDrawItem(Control: TWinControl;
Index: Integer; Rect: TRect; State: TOwnerDrawState);
+var AlignRight: boolean;
+ w: integer;
begin
+ //\83S\81[\83X\83g\91I\91ð\83{\83b\83N\83X\82Ì\83I\81[\83i\81[\83h\83\8d\81[
with cbxTargetGhost do begin
- if Index > 0 then begin
+ AlignRight := false;
+ if Pref.HideGhosts and not FTargetGhostExpand and (Index = Items.Count-1) then
+ begin
+ // \81u\82·\82×\82Ä\95\\8e¦\81v
+ Canvas.Font.Color := clWindowText;
+ Canvas.Font.Style := [];
+ AlignRight := true;
+ end else if (Index > 0) then
+ begin
+ // \83S\81[\83X\83g\96¼\82ð\91I\91ð
if SakuraSeeker.ProcessByName[Items[Index]] = nil then
- Canvas.Font.Color := clRed
+ Canvas.Font.Color := clRed // \91¶\8dÝ\82µ\82È\82¢\83S\81[\83X\83g
else
- Canvas.Font.Color := clBlue;
+ Canvas.Font.Color := clBlue; // \91¶\8dÝ\82·\82é\83S\81[\83X\83g
Canvas.Font.Style := [fsBold];
- end else begin
+ end else
+ begin
Canvas.Font.Color := clWindowText;
Canvas.Font.Style := [];
end;
if odSelected in State then
Canvas.Font.Color := clHighlightText;
- cbxTargetGhost.Canvas.TextRect(Rect, Rect.Left, Rect.Top,
- cbxTargetGhost.Items[Index]);
+ // \95`\89æ
+ if AlignRight then
+ begin
+ w := Canvas.TextWidth(cbxTargetGhost.Items[Index]);
+ Canvas.TextRect(Rect, Rect.Right - w, Rect.Top,
+ cbxTargetGhost.Items[Index]);
+ end else
+ Canvas.TextRect(Rect, Rect.Left, Rect.Top,
+ cbxTargetGhost.Items[Index]);
end;
end;
for i := 0 to SakuraSeeker.Count-1 do begin
// \94j\91¹FMO\91Î\8dô\81BHWND\82Ì\92f\95Ð\82ª\8ec\82Á\82Ä\82¢\82é\82ªName\82ª\8fÁ\82¦\82Ä\82¢\82é\8fê\8d\87\82ª\82 \82é
if Length(SakuraSeeker[i].Name) = 0 then Continue;
- if Pref.HideGhosts then
+ if Pref.HideGhosts and not FTargetGhostExpand then
if Pref.VisibleGhostsList.IndexOf(SakuraSeeker[i].Name) < 0 then
Continue;
if cbxTargetGhost.Items.IndexOf(SakuraSeeker[i].Name) < 0 then
end;
end;
end;
+ if Pref.HideGhosts and not FTargetGhostExpand then
+ Items.Add('\82·\82×\82Ä\95\\8e¦...');
end;
end;
UpdateIfGhostBox;
i := cbxTargetGhost.ItemIndex;
Dec(i);
- if i <= -1 then i := cbxTargetGhost.Items.Count-1;
+ if i <= -1 then
+ begin
+ i := cbxTargetGhost.Items.Count-1;
+ if Pref.HideGhosts and not FTargetGhostExpand then
+ i := i - 1;
+ end;
cbxTargetGhost.ItemIndex := i;
cbxTargetGhostChange(self);
end;
UpdateIfGhostBox;
i := cbxTargetGhost.ItemIndex;
Inc(i);
- if i > cbxTargetGhost.Items.Count-1 then i := 0;
+ if Pref.HideGhosts and not FTargetGhostExpand then
+ begin
+ if i > cbxTargetGhost.Items.Count-2 then i := 0;
+ end else
+ begin
+ if i > cbxTargetGhost.Items.Count-1 then i := 0;
+ end;
cbxTargetGhost.ItemIndex := i;
cbxTargetGhostChange(self);
end;
procedure TfrmSender.cbxTargetGhostChange(Sender: TObject);
begin
+ // \81u\82·\82×\82Ä\95\\8e¦\81v\82ð\91I\91ð\82³\82ê\82½\8fê\8d\87\82Í\83S\81[\83X\83g\91I\91ð\83{\83b\83N\83X\82ð\8dÄ\8d\\92z
+ if Pref.HideGhosts and not FTargetGhostExpand then
+ begin
+ with cbxTargetGhost do
+ begin
+ if ItemIndex = Items.Count-1 then
+ begin
+ FTargetGhostExpand := true;
+ UpdateIfGhostBox;
+ ItemIndex := 0;
+ DroppedDown := true;
+ end;
+ end;
+ end;
+ // \92è\8c^\8bå\83\81\83j\83\85\81[\82ð\8dÄ\8d\\92z
ConstructMenu(true);
end;