#1078 TextBox masking in window mode.
-
UpdateTextBoxHostLocationnow centralizes where the WinForms input control lives. In fullscreen it sits where it always was; in windowed mode it’s moved toHiddenTextBoxLocationso it never paints over Mir UIs. - Mouse input paths (
OnMouseDown/Move/Up/DoubleClick/Wheel) detect when the control is hidden and replay the corresponding Windows messages viaSendMessage, usingCMain.MPointto compute the caret position. Keyboard input still flows through the realTextBox, so all selection/editing behavior is preserved without rewriting it manually. - Texture creation is still triggered everywhere (windowed + fullscreen), so the Mir-themed mask/caret drawn from
TextBox.DrawToBitmapnow matches in both modes.
@Suprcode not sure whether this is the correct direction which AI provided.
Your screenshot just shows a blank textbox, does it actually perform correctly with the same text box display and carat etc?
Screenshot 1 = Full Screen, no text box overlay issues. Screenshot 2 = Window mode, text box overlay issues. Screenshot 3 = Window mode, no text box overlay issue.
I did find that the client would freeze, then close. I have done further testing and no longer freezes/client closing. I would like someone else to apply this and test for confirmation.
Your screenshot doesn't show any text in the text boxes, or active carats.
Show screenshots of the textbox in edit mode with a full page of text, and another of the chat bar with actife carat
Window mode, Another dialog covering GameShop search box.
Window mode, Inventory dialog covering Guild notice page.
If someone else can please test, and confirm would be greatful
https://github.com/Suprcode/Crystal/blob/627e11f4f083e27a206b2953a1c9e103d823cb1d/Client/MirNetwork/Network.cs#L41
I noticed another issue with textbox: in some scenarios client tries to update gui from network thread, which is not a good idea, and runtime will raise an exception by default. this happens for all mir controls with an embedded winform control.
ref: https://learn.microsoft.com/en-us/dotnet/desktop/winforms/controls/how-to-make-thread-safe-calls