Commit 629f8b54 authored by fallenstardust's avatar fallenstardust

fix drag lstLog

parent e0f6e8b0
...@@ -2050,13 +2050,12 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) { ...@@ -2050,13 +2050,12 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
break; break;
} }
rect<s32> lstLogpos = mainGame->lstLog->getRelativePosition(); rect<s32> lstLogpos = mainGame->lstLog->getRelativePosition();
int pos = dragging_tab_start_pos + ((dragging_tab_start_y - event.MouseInput.Y));
int pos = dragging_tab_start_pos + ((dragging_tab_start_y - event.MouseInput.Y) / mainGame->lstLog->getItemCount()) * 10 * mainGame->yScale;
int max = mainGame->lstLog->getVerticalScrollBar()->getMax(); int max = mainGame->lstLog->getVerticalScrollBar()->getMax();
if(pos < 0) pos = 0; if(pos < 0) pos = 0;
if(pos > max) pos = max; if(pos > max) pos = max;
mainGame->lstLog->getVerticalScrollBar()->setPos(pos); mainGame->lstLog->getVerticalScrollBar()->setPos(pos);
mainGame->lstLog->setRelativePosition(recti(10 * mainGame->xScale, 10 * mainGame->yScale + mainGame->lstLog->getVerticalScrollBar()->getPos() * -1, lstLogpos.LowerRightCorner.X, lstLogpos.LowerRightCorner.Y)); mainGame->lstLog->getItemAt(lstLogpos.UpperLeftCorner.X, mainGame->lstLog->getVerticalScrollBar()->getPos());
} }
if(is_dragging_tabHelper) { if(is_dragging_tabHelper) {
if(!mainGame->scrTabHelper->isVisible()) { if(!mainGame->scrTabHelper->isVisible()) {
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
1.更新ygo内核; 1.更新ygo内核;
2.默认大师规则2020; 2.默认大师规则2020;
3.新卡1101+VJ; 3.新卡1101+VJ;
4.左侧效果文本支持手指上下翻页; 4.左侧卡片信息支持手指上下翻页;
新增: 新增:
1.搜索结果增加卡片收藏夹列表; 1.搜索结果增加卡片收藏夹列表;
2.卡片详情可增加/移出搜藏; 2.卡片详情可增加/移出搜藏;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment