To explain the highlighting problem further:
1. Open a script in Client RC.
2. Highlight the text with your mouse, and hold down the button.
3. Move your mouse cursor off the script editor window.
4. Let go of the mouse button.
5. Hover over the script window, the text edit control is still in highlighting mode despite the mouse button not being held down.
There is also issues with autoindenting in MLTextEditCtrls:
1. Go to the very bottom of a script in client rc.
2. Try to write:
PHP Code:
function example() {
asdf();
asdf();
qwer();
}
For me it doesn't update the position of the cursor properly.
Video:
Double Clicking + onMouseDown
I don't think onMouseDown reports double clicks properly because it registers the mouse down three times (which makes it very annoying to check if the double-click happened in the same area as the single click) in situations where I only clicked twice within 0.3 of a second.
Two clicks in two different spots that are more than 16 pixels apart shouldn't register as a double-click either but it does.
PHP Code:
//#CLIENTSIDE
function onMouseDown(click) {
echo(click SPC timevar2);
}
My Script Workaround:
PHP Code:
//#CLIENTSIDE
function GraalControl.onMouseDown(a, tx, ty, clickcount) {
temp.double = false;
if (clickcount == 2) {
temp.dist = vectordist({mousex, mousey, 0}, this.last_click);
if (temp.dist < 0.5) {
temp.double = true;
}
}
if (temp.double) {
onMousePressed("double");
} else {
onMousePressed("left");
}
this.last_click = {mousex, mousey, 0};
}
function GraalControl.onRightMouseDown() {
onMousePressed("right");
}
function onMousePressed(click) {
// code...
}
Syntax Highlighting MLTextEditCtrls
Can it be changed to operate on it's own profile values? Right now it uses fontcolorhl, fontcolorlink and so on. It'd be nice to be able to set for specific types: string, keywords, and so on.