//Uint + テキスト (PARSER) + unit テキストを書くルーチン public static Size Draw(ListBox lb, int index, Graphics g, Rectangle listbounds, bool isWithDraw) { SolidBrush brush = new SolidBrush(lb.ForeColor); Font normalFont = lb.Font; string text; Rectangle bounds = listbounds; int textmargineY = (ListBoxEx.OWNER_DRAW_ICON_SIZE - (int)lb.Font.Height) / 2; text = R._("会話グループ") + ":" + U.ToHexString(index); bounds.X += U.DrawText(text, g, normalFont, brush, isWithDraw, bounds); List <U.AddrResult> units = UnitForm.MakeUnitList(); int unitMax = Math.Min(units.Count, (int)UnitForm.MAX_PLAYER_UNIT_ID + 1); //戦績が選べるのは 0x45まで for (int i = 0; i < unitMax; i++) { uint talkGroup = UnitForm.GetTalkGroupByAddr(units[i].addr); if (talkGroup == index) { Bitmap bitmap = UnitForm.DrawUnitMapFacePictureByAddr(units[i].addr); U.MakeTransparent(bitmap); //アイコンを描く. 処理速度を稼ぐためにマップアイコンの方を描画 Rectangle b = bounds; b.Width = ListBoxEx.OWNER_DRAW_ICON_SIZE; b.Height = ListBoxEx.OWNER_DRAW_ICON_SIZE; bounds.X += U.DrawPicture(bitmap, g, isWithDraw, b); } } bounds.Y += ListBoxEx.OWNER_DRAW_ICON_SIZE; return(new Size(bounds.X, bounds.Y)); }