|
@@ -986,7 +986,7 @@ void la_MultiStringDraw(laUiItem *ui, int h){
|
|
}
|
|
}
|
|
|
|
|
|
laStringEdit* se=ui->Extra->Edit;
|
|
laStringEdit* se=ui->Extra->Edit;
|
|
- int MonoWidth=tnsGetMonoFontAdvance(); int Count=se->TotalLines;
|
|
|
|
|
|
+ real MonoWidth=tnsGetMonoFontAdvance(); int Count=se->TotalLines;
|
|
while(Count){ Count/=10; NumberWidth+=MonoWidth; }
|
|
while(Count){ Count/=10; NumberWidth+=MonoWidth; }
|
|
|
|
|
|
if (ui->State!=LA_UI_ACTIVE){
|
|
if (ui->State!=LA_UI_ACTIVE){
|
|
@@ -1752,7 +1752,7 @@ int OPINV_EditStringCopySelection(laOperator *a, laEvent *e){
|
|
|
|
|
|
int la_ProcessTextEdit(laEvent *e, laStringEdit *se, laUiItem* ui){
|
|
int la_ProcessTextEdit(laEvent *e, laStringEdit *se, laUiItem* ui){
|
|
int Select=e->SpecialKeyBit&LA_KEY_SHIFT;
|
|
int Select=e->SpecialKeyBit&LA_KEY_SHIFT;
|
|
- int _L, MonoWidth;
|
|
|
|
|
|
+ real _L, MonoWidth;
|
|
switch (e->Type){
|
|
switch (e->Type){
|
|
case LA_INPUT:
|
|
case LA_INPUT:
|
|
switch (e->Input){
|
|
switch (e->Input){
|
|
@@ -1775,15 +1775,13 @@ int la_ProcessTextEdit(laEvent *e, laStringEdit *se, laUiItem* ui){
|
|
case LA_L_MOUSE_DOWN:
|
|
case LA_L_MOUSE_DOWN:
|
|
case LA_MOUSEMOVE:
|
|
case LA_MOUSEMOVE:
|
|
if(!ui) return 0;
|
|
if(!ui) return 0;
|
|
- MonoWidth=tnsGetMonoFontAdvance(); _L=(*ui->Type->Theme)->LM;
|
|
|
|
|
|
+ MonoWidth=tnsGetMonoFontAdvance(); _L=(*ui->Type->Theme)->LM+ui->L;
|
|
int Count=se->TotalLines; while(Count){ Count/=10; _L+=MonoWidth; }
|
|
int Count=se->TotalLines; while(Count){ Count/=10; _L+=MonoWidth; }
|
|
if(e->Type==LA_L_MOUSE_DOWN){
|
|
if(e->Type==LA_L_MOUSE_DOWN){
|
|
strSetCursor(se, (e->y-ui->U)/LA_RH+se->ViewStartLine, (e->x-_L-MonoWidth/2)/MonoWidth); strCancelSelect(se); strLazySelect(se);
|
|
strSetCursor(se, (e->y-ui->U)/LA_RH+se->ViewStartLine, (e->x-_L-MonoWidth/2)/MonoWidth); strCancelSelect(se); strLazySelect(se);
|
|
se->MouseSelecting=1; se->CursorPreferBefore=se->CursorBefore; return 1;
|
|
se->MouseSelecting=1; se->CursorPreferBefore=se->CursorBefore; return 1;
|
|
}else{
|
|
}else{
|
|
if(!se->MouseSelecting) return 0;
|
|
if(!se->MouseSelecting) return 0;
|
|
- MonoWidth=tnsGetMonoFontAdvance(); _L=(*ui->Type->Theme)->LM;
|
|
|
|
- int Count=se->TotalLines; while(Count){ Count/=10; _L+=MonoWidth; }
|
|
|
|
strSetCursor(se, (e->y-ui->U)/LA_RH+se->ViewStartLine, (e->x-_L-MonoWidth/2)/MonoWidth); strEndSelect(se);
|
|
strSetCursor(se, (e->y-ui->U)/LA_RH+se->ViewStartLine, (e->x-_L-MonoWidth/2)/MonoWidth); strEndSelect(se);
|
|
se->CursorPreferBefore=se->CursorBefore; return 1;
|
|
se->CursorPreferBefore=se->CursorBefore; return 1;
|
|
}return 0;
|
|
}return 0;
|
|
@@ -1933,8 +1931,8 @@ int OPMOD_IntArrayHorizon(laOperator *a, laEvent *e){
|
|
return LA_RUNNING;
|
|
return LA_RUNNING;
|
|
}
|
|
}
|
|
|
|
|
|
- if (ui->State == LA_UI_EDITING){
|
|
|
|
- if (la_ProcessTextEdit(e, uit->Edit, ui))laRedrawCurrentPanel();
|
|
|
|
|
|
+ if (uit->Edit){
|
|
|
|
+ if (la_ProcessTextEdit(e, uit->Edit, ui)) laRedrawCurrentPanel();
|
|
return LA_RUNNING;
|
|
return LA_RUNNING;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2567,9 +2565,9 @@ int OPMOD_MultiString(laOperator *a, laEvent *e){
|
|
ui->State = LA_UI_ACTIVE;
|
|
ui->State = LA_UI_ACTIVE;
|
|
laGetString(&ui->PP, _buf, &buf);
|
|
laGetString(&ui->PP, _buf, &buf);
|
|
strBeginEdit(&es->Edit,buf);la_SetMultistringViewRange(ui,es->Edit,bt);
|
|
strBeginEdit(&es->Edit,buf);la_SetMultistringViewRange(ui,es->Edit,bt);
|
|
|
|
+ laRedrawCurrentPanel();
|
|
|
|
+ return LA_RUNNING;
|
|
}
|
|
}
|
|
- laRedrawCurrentPanel();
|
|
|
|
- return LA_RUNNING;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
if (e->Type == LA_R_MOUSE_DOWN){
|
|
if (e->Type == LA_R_MOUSE_DOWN){
|
|
@@ -2580,7 +2578,7 @@ int OPMOD_MultiString(laOperator *a, laEvent *e){
|
|
return LA_RUNNING;
|
|
return LA_RUNNING;
|
|
}
|
|
}
|
|
|
|
|
|
- if (ui->State == LA_UI_EDITING){
|
|
|
|
|
|
+ if (ui->State == LA_UI_ACTIVE){
|
|
if (la_ProcessTextEdit(e, se, ui))laRedrawCurrentPanel();
|
|
if (la_ProcessTextEdit(e, se, ui))laRedrawCurrentPanel();
|
|
return LA_RUNNING;
|
|
return LA_RUNNING;
|
|
}
|
|
}
|