*/}}
ソースを参照

panning and animation fix

YimingWu 3 ヶ月 前
コミット
21224453c9
2 ファイル変更18 行追加9 行削除
  1. 9 5
      la_kernel.c
  2. 9 4
      resources/la_operators.c

+ 9 - 5
la_kernel.c

@@ -6101,11 +6101,15 @@ int la_AnimateUiListRecursive(laUiList *uil){
     int Again = 0;
     for (ui = uil->UiItems.pFirst; ui; ui = ui->Item.pNext){
         int TB = ui->B, TU = ui->U, TL = ui->L, TR = ui->R, SB, SU, SL, SR;
-
-        Again += (la_AnimateSingleUiSize(ui->TB, &ui->B) +
-                  la_AnimateSingleUiSize(ui->TU, &ui->U) +
-                  la_AnimateSingleUiSize(ui->TL, &ui->L) +
-                  la_AnimateSingleUiSize(ui->TR, &ui->R));
+        
+        if(ui->AnimationDistinguish != MAIN.CurrentPanel->FrameDistinguish){
+            ui->B=ui->TB; ui->L=ui->TL; ui->R=ui->TR; ui->U=ui->TU;
+        }else{
+            Again += (la_AnimateSingleUiSize(ui->TB, &ui->B) +
+                    la_AnimateSingleUiSize(ui->TU, &ui->U) +
+                    la_AnimateSingleUiSize(ui->TL, &ui->L) +
+                    la_AnimateSingleUiSize(ui->TR, &ui->R));
+        }
 
         if (ui->Type == _LA_UI_COLLECTION_SELECTOR || ui->Type == _LA_UI_COLLECTION_SINGLE ||
             (ui->PP.LastPs && ui->PP.LastPs->p && ui->PP.LastPs->p->PropertyType == LA_PROP_SUB && ui->Type != _LA_UI_CANVAS)){

+ 9 - 4
resources/la_operators.c

@@ -1912,10 +1912,15 @@ int la_ScrollPanel(laGeneralUiExtraData*ex, laPanel*p, laEvent* e){
         ret= 1;
     }
     if(e->type==LA_M_MOUSE_UP){ ex->TargetIndexVali=0; }
-    if (e->type & LA_KEY_MOUSE_SCROLL || (e->type==LA_M_MOUSE_DOWN) || (e->type&LA_KEY_PANNING)){
-        laUiItem *pui = 0; laListHandle levels={0}; int dir;
-        if (e->type & LA_STATE_DOWN) dir=1;
-        elif (e->type & LA_STATE_UP) dir=-1;
+    if (e->type & LA_KEY_MOUSE_SCROLL || (e->type==LA_M_MOUSE_DOWN) || (e->key&LA_KEY_PANNING)){
+        laUiItem *pui = 0; laListHandle levels={0}; int dir=0;
+        if(e->key&LA_KEY_PANNING){
+            if (e->key&LA_KEY_ARRDOWN) dir=1;
+            elif (e->key&LA_KEY_ARRUP) dir=-1;
+        }else{
+            if (e->type & LA_STATE_DOWN) dir=1;
+            elif (e->type & LA_STATE_UP) dir=-1;
+        }
         laUiList *duil = la_DetectUiListRecursiveDeep(p->MenuRefer?p->MenuRefer:&p->UI, e->x, e->y, 10000, &pui, 0, 0, 0, 0, &levels);
         laUiListRecord* lip=levels.pLast; laUiList* uuil=lip->uil; laUiItem* upui=lip->Item.pPrev?((laUiListRecord*)lip->Item.pPrev)->pui:0; int ran=0;
         if(e->SpecialKeyBit == LA_KEY_CTRL){