Beispiel #1
0
 private void SetDescriptionImage()
 {
     if (Item.ItemType == 3)
     {
         int[] pixels = descriptionPreview.GetPreview(
             Fonts.Model.Description, Fonts.Model.Palette_Menu.Palettes[0],
             Item.RawDescription,
             new Size(120, 48), new Point(8, 8), 4);
         descriptionText = Do.PixelsToImage(pixels, 120, 48);
         if (descriptionBGEquip == null)
         {
             int[] bgPixels = Do.ImageToPixels(Menus.Model.MenuBG_256x256);
             Do.DrawMenuFrame(bgPixels, 256, new Rectangle(0, 0, 15, 6), Menus.Model.Menu_Frame_Graphics, Fonts.Model.Palette_Menu.Palette);
             descriptionBGEquip = Do.PixelsToImage(bgPixels, 256, 256);
         }
     }
     else
     {
         int[] pixels = descriptionPreview.GetPreview(
             Fonts.Model.Description, Fonts.Model.Palette_Menu.Palettes[0],
             Item.RawDescription,
             new Size(136, 64), new Point(16, 16), 4);
         descriptionText = Do.PixelsToImage(pixels, 136, 64);
         if (descriptionBGItem == null)
         {
             int[] bgPixels = Do.ImageToPixels(Menus.Model.MenuBG_256x256);
             Do.DrawMenuFrame(bgPixels, 256, new Rectangle(0, 0, 17, 8), Menus.Model.Menu_Frame_Graphics, Fonts.Model.Palette_Menu.Palette);
             descriptionBGItem = Do.PixelsToImage(bgPixels, 256, 256);
         }
     }
     pictureDescription.Invalidate();
 }
 private void SetDescriptionImage()
 {
     if (item.ItemType == 3)
     {
         int[] pixels = menuDescPreview.GetPreview(
             Model.FontDescription, Model.FontPaletteMenu.Palettes[0],
             item.RawDescription,
             new Size(120, 48), new Point(8, 8), 4);
         descriptionText = Do.PixelsToImage(pixels, 120, 48);
         if (descriptionBGEquip == null)
         {
             int[] bgPixels = Do.ImageToPixels(Model.MenuBG);
             Do.DrawMenuFrame(bgPixels, 256, new Rectangle(0, 0, 15, 6), Model.MenuFrameGraphics, Model.FontPaletteMenu.Palette);
             descriptionBGEquip = Do.PixelsToImage(bgPixels, 256, 256);
         }
     }
     else
     {
         int[] pixels = menuDescPreview.GetPreview(
             Model.FontDescription, Model.FontPaletteMenu.Palettes[0],
             item.RawDescription,
             new Size(136, 64), new Point(16, 16), 4);
         descriptionText = Do.PixelsToImage(pixels, 136, 64);
         if (descriptionBGItem == null)
         {
             int[] bgPixels = Do.ImageToPixels(Model.MenuBG);
             Do.DrawMenuFrame(bgPixels, 256, new Rectangle(0, 0, 17, 8), Model.MenuFrameGraphics, Model.FontPaletteMenu.Palette);
             descriptionBGItem = Do.PixelsToImage(bgPixels, 256, 256);
         }
     }
     pictureBoxItemDesc.Invalidate();
 }
 private void pictureBoxSpellDesc_Paint(object sender, PaintEventArgs e)
 {
     if (spell.RawDescription == null)
     {
         return;
     }
     if (descriptionFrame == null)
     {
         int[] bgPixels = Do.ImageToPixels(Model.MenuBG);
         Do.DrawMenuFrame(bgPixels, 256, new Rectangle(0, 0, 15, 8), Model.MenuFrameGraphics, Model.FontPaletteMenu.Palette);
         descriptionFrame = Do.PixelsToImage(bgPixels, 256, 256);
     }
     e.Graphics.DrawImage(descriptionFrame, 0, 0);
     if (descriptionText == null)
     {
         SetDescriptionText();
     }
     e.Graphics.DrawImage(descriptionText, 0, 0);
 }
Beispiel #4
0
 private void pictureBoxDescription_Paint(object sender, PaintEventArgs e)
 {
     if (spell.RawDescription == null)
     {
         return;
     }
     if (descriptionFrameImage == null)
     {
         int[] bgPixels = Do.ImageToPixels(Menus.Model.MenuBG_256x256);
         Do.DrawMenuFrame(bgPixels, 256, new Rectangle(0, 0, 15, 8), Menus.Model.Menu_Frame_Graphics, Fonts.Model.Palette_Menu.Palette);
         descriptionFrameImage = Do.PixelsToImage(bgPixels, 256, 256);
     }
     e.Graphics.DrawImage(descriptionFrameImage, 0, 0);
     if (descriptionTextImage == null)
     {
         SetDescriptionText();
     }
     e.Graphics.DrawImage(descriptionTextImage, 0, 0);
 }