X
XirmiX
Guest
I've heard from a previous thread that Global Mouse Left would be the way to go to make it so that, say, a text box I've created gets deselected. However, the moment I do this, even when I click on the text box itself, it stops from being . It seems as if Global Mouse Left overrides Mouse Left, despite the latter being first in the event list. So, question is, how do I make it so that when I click anywhere BUT the textbox, the textbox gets deselected? Mouse cursor isn't an object, so you can't do a "place meeting".
I've had others suggest me having an object that constantly follows the mouse cursor, but honestly that seems like a dubiously bad idea. I had previously followed a text box tutorial and had help from the other topic about this and some other issues before, however because it got to a point where there's no redemption to that code, I've decided to abandon ship and re-do the code, especially since I was using and keeping keyboard_strings in places I didn't want to and vice versa.
Here's my basic code currently for the selection itself (yes, I have other code for writing in the actual text box and such):
Create event
Left Mouse Click
Global Left Mouse Click
Without the global mouse event code, I start typing and nothing happens, and then click on the box and typing does happen.
With the global mouse event code, I start typing and nothing happens, and then click on the box and still nothing happens.
I've had others suggest me having an object that constantly follows the mouse cursor, but honestly that seems like a dubiously bad idea. I had previously followed a text box tutorial and had help from the other topic about this and some other issues before, however because it got to a point where there's no redemption to that code, I've decided to abandon ship and re-do the code, especially since I was using and keeping keyboard_strings in places I didn't want to and vice versa.
Here's my basic code currently for the selection itself (yes, I have other code for writing in the actual text box and such):
Create event
Code:
self.selected = false;
self.max_char = 30;
self.char_written = 0;
txt = "";
Code:
self.selected = true;
Code:
self.selected = false;
Without the global mouse event code, I start typing and nothing happens, and then click on the box and typing does happen.
With the global mouse event code, I start typing and nothing happens, and then click on the box and still nothing happens.