protected override void Update(float delta) { EasyInputAction.InsideMouseLeftDown(); EasyInputAction.InsideMouseLeftUp(); var font = FontClass.Fonts(FontSize); if (TellTranslation == false) { Content = ContentA; } else { Content = ContentA + GiveTheTranslation(); } //do not need to change the text buffer, because we do not change any propertry if (mTextBuffer != null && mTextBuffer.Content == Content && mTextBuffer.Font == font) { return; } Utility.Dispose(ref mTextBuffer); mTextBuffer = new Text(Content, font, new Size()); }
public MyGuiButton(string content, FontClass fontClass, int fontSize, Size size) { Content = content; ContentA = content; FontClass = fontClass; FontSize = fontSize; Size = size; Image = Image.Load(".\\pic\\rectbutton_null.png"); Style = new GuiButtonStyle(); Dragable = false; Readable = false; var font = FontClass.Fonts(FontSize); mTextBuffer = new Text(Content, font, new Size()); EasyInputAction = new EasyInputAction(this); EasyInputAction.AddEvent_InsideMouseLeftDown(Event_MouseLiftDown0); }