summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/filebrowser/FileBrowserActivity.cpp2
-rw-r--r--src/gui/game/GameView.cpp6
-rw-r--r--src/gui/preview/PreviewView.cpp14
3 files changed, 13 insertions, 9 deletions
diff --git a/src/gui/filebrowser/FileBrowserActivity.cpp b/src/gui/filebrowser/FileBrowserActivity.cpp
index d27f1b1..1b72760 100644
--- a/src/gui/filebrowser/FileBrowserActivity.cpp
+++ b/src/gui/filebrowser/FileBrowserActivity.cpp
@@ -314,7 +314,7 @@ void FileBrowserActivity::OnTick(float dt)
itemList->AddChild(*iter);
}
componentsQueue.clear();
- itemList->InnerSize.Y = (buttonHeight+(buttonPadding*2))*fileY;
+ itemList->InnerSize.Y = (buttonHeight+(buttonPadding*2))*(fileY+1);
if(!componentsQueue.size())
progressBar->Visible = false;
}
diff --git a/src/gui/game/GameView.cpp b/src/gui/game/GameView.cpp
index 12904f1..41dc248 100644
--- a/src/gui/game/GameView.cpp
+++ b/src/gui/game/GameView.cpp
@@ -1633,12 +1633,12 @@ void GameView::DoMouseMove(int x, int y, int dx, int dy)
int mouseX = x;
if(mouseX > XRES)
mouseX = XRES;
- if (mouseX < 15)
- mouseX = 15;
+ //if (mouseX < 15) //makes scrolling a little nicer at edges but apparently if you put hundreds of elements in a menu it makes the end not show ...
+ // mouseX = 15;
scrollBar->Position.X = (int)(((float)mouseX/((float)XRES))*(float)(XRES-scrollSize));
- float overflow = totalWidth-(XRES-BARSIZE), mouseLocation = float(XRES)/float(mouseX-(XRES));
+ float overflow = totalWidth-(XRES-BARSIZE), mouseLocation = float(XRES-3)/float(mouseX-(XRES-2)); //mouseLocation adjusted slightly in case you have 200 elements in one menu
setToolButtonOffset(overflow/mouseLocation);
//Ensure that mouseLeave events are make their way to the buttons should they move from underneath the mouse pointer
diff --git a/src/gui/preview/PreviewView.cpp b/src/gui/preview/PreviewView.cpp
index 9d091e1..1cd619b 100644
--- a/src/gui/preview/PreviewView.cpp
+++ b/src/gui/preview/PreviewView.cpp
@@ -384,12 +384,16 @@ void PreviewView::OnMouseWheel(int x, int y, int d)
void PreviewView::OnMouseUp(int x, int y, unsigned int button)
{
- if(commentsPanel->GetScrollLimit() == 1)
- c->NextCommentPage();
- if(commentsPanel->GetScrollLimit() == -1)
+ //if mouse is on the scrollbar or farther right, and you are at the top of bottom of a page, change pages
+ if (x > Position.X+commentsPanel->Position.X+commentsPanel->Size.X-6)
{
- if (c->PrevCommentPage())
- prevPage = true;
+ if (commentsPanel->GetScrollLimit() == 1)
+ c->NextCommentPage();
+ if (commentsPanel->GetScrollLimit() == -1)
+ {
+ if (c->PrevCommentPage())
+ prevPage = true;
+ }
}
}