void on_texturestage_changed(object o, EventArgs e) { LogFile.WriteLine("on_texturestage_changed() >>>"); MapTextureStageModel maptexturestage = GetSelectedMapTextureStage(); if (maptexturestage != null) { texturefilenamelbl.Text = maptexturestage.SplatTextureFilename; blendtexturefilename.Text = maptexturestage.BlendTextureFilename; operationcombo.Entry.Text = maptexturestage.Operation.ToString(); (BrushEffectController.GetInstance() .brusheffects[typeof(PaintTexture)] as PaintTexture) .SetCurrentEditTexture(maptexturestage); tilesizescale.Value = maptexturestage.Tilesize; } LogFile.WriteLine("on_texturestage_changed() <<<"); }
void buttonpressed(object o, EventArgs args) { Button thisbutton = o as Button; Highlight(thisbutton); foreach (Button button in buttons) { Unhighlight(button); } string unitname = thisbutton.Name; LogFile.GetInstance().WriteLine(o.ToString() + " " + unitname + " pressed"); if (!UnitCache.GetInstance().UnitsByName.ContainsKey(unitname)) { Unit unit = new S3oLoader().LoadS3o("objects3d" + "/" + unitname + ".s3o"); UnitCache.GetInstance().UnitsByName.Add(unitname, unit); } (BrushEffectController.GetInstance().brusheffects[typeof(AddFeature)] as AddFeature) .currentfeature = UnitCache.GetInstance().UnitsByName[unitname]; }