public void SetBitmaps(FileManager fileManager, HGLWindowStyle windowStyle) { AtlasImageLoader loader; loader = new AtlasImageLoader(); loader.LoadAtlas(@"data\uix\xml\main_atlas.xml", fileManager); List <Bitmap> imageList = new List <Bitmap>(); imageList.Clear(); imageList.Add(loader.GetImage(windowStyle + "_1_TL")); imageList.Add(loader.GetImage(windowStyle + "_2_TM")); imageList.Add(loader.GetImage(windowStyle + "_3_TR")); imageList.Add(loader.GetImage(windowStyle + "_4_ML")); imageList.Add(loader.GetImage(windowStyle + "_5_MM")); imageList.Add(loader.GetImage(windowStyle + "_6_MR")); imageList.Add(loader.GetImage(windowStyle + "_7_BL")); imageList.Add(loader.GetImage(windowStyle + "_8_BM")); imageList.Add(loader.GetImage(windowStyle + "_9_BR")); SetBitmaps(imageList); loader.ClearImageList(); imageList.Clear(); }
public AnimationTestForm(FileManager fileManager) { InitializeComponent(); animations = new List <string>(); animations.Add("health anim "); animations.Add("power anim "); loader = new AtlasImageLoader(); loader.LoadAtlas(@"data\uix\xml\main_new_atlas.xml", fileManager); handler = new AnimationHandler(); handler.Speed = (int)numericUpDown1.Value; handler.NewFrameEvent += new NewFrame(handler_NewFrameEvent); handler.AddOverlay(loader.GetImage("meter mask")); handler.AddOverlay(loader.GetImage("health meter")); comboBox1.DataSource = animations; }
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { string text = (string)comboBox1.SelectedItem; handler.ClearFrames(); for (int counter = 1; counter < 17; counter++) { handler.AddFrame(loader.GetImage(text + counter)); } }
private void InitSkillPanel(AtlasImageLoader loader) { Panel panel = new Panel(); panel.BackColor = Color.Transparent; panel.BackgroundImageLayout = ImageLayout.Stretch; Bitmap img = loader.GetImage("skill panel"); this.BackgroundImage = img; this.ClientSize = img.Size; panel.Scale(new SizeF(0.7f, 0.7f)); this.Controls.Add(panel); }
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { Bitmap bmp = loader.GetImage((string)comboBox1.SelectedItem); pictureBox1.Image = bmp; }