/// <summary> /// Exports the GUI Sprite to disk /// </summary> /// <param name="bw"></param> public override void Export(PlatformBinaryWriter bw) { FourCCStack fourCCStack = new FourCCStack(bw); fourCCStack.Push("GBTT"); base.Export(bw); bw.Write(Scene.GetUniqueTextureID(mDefaultTextureID)); bw.Write(Scene.GetUniqueTextureID(mDownTextureID)); bw.Write(mLabel.FontID); bw.Write(DefaultColor.ToArgb()); bw.Write(DownColor.ToArgb()); bw.Write(1.0f); bw.Write(1.0f); bw.Write((UInt32)HorizontalAlignment); bw.Write((UInt32)VerticalAlignment); bw.Write(OnClickActionList.Count); byte[] bytes = Utils.StringToBytes(mLabel.Text, 4); bw.Write(bytes.Length); bw.Write(bytes); foreach (UI.Actions.Action action in this.OnClickActionList) { action.Export(bw); } fourCCStack.Pop(); }
private void Rectangle_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { DownColor?.Invoke(this, new EventArgs()); f = true; }