View Single Post
  #1207  
Old 08-24-2011, 05:49 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
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(atxtyclickcount) {
  
temp.double false;
  if (
clickcount == 2) {
    
temp.dist vectordist({mousexmousey0}, this.last_click);
    if (
temp.dist 0.5) {
      
temp.double true;
    }
  }
  if (
temp.double) {
    
onMousePressed("double");
  } else {
    
onMousePressed("left");
  }
  
this.last_click = {mousexmousey0};
}

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.
__________________
Quote:

Last edited by fowlplay4; 08-25-2011 at 02:30 AM..
Reply With Quote