new icon and fix scrollbar
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 72 KiB |
|
|
@ -178,22 +178,18 @@ class GuiConsoleScrollCtrl extends GuiControl {
|
|||
|
||||
// this.scrollTrack.setPosition(renderRect.position.x + renderRect.extent.x - 18 * Settings.uiScale, renderRect.position.y);
|
||||
|
||||
var scrollExtentY = renderRect.extent.y - 34 * Settings.uiScale;
|
||||
|
||||
var scrollBarYSize = (scrollExtentY * scrollExtentY / (maxScrollY * Settings.uiScale - 34 * Settings.uiScale));
|
||||
|
||||
var scrollBarYSize = (renderRect.extent.y * renderRect.extent.y / (maxScrollY * Settings.uiScale));
|
||||
var scrollYOld = scrollY;
|
||||
this.scrollTrack.bmp.scaleY = renderRect.extent.y;
|
||||
|
||||
this.scrollY = Util.clamp(scrollY, 0, scrollExtentY - scrollBarYSize * Settings.uiScale);
|
||||
this.scrollY = Util.clamp(scrollY, 0, renderRect.extent.y - scrollBarYSize * Settings.uiScale);
|
||||
scrollBarYSize = Math.max(scrollBarYSize, 13);
|
||||
|
||||
this.scrollBarY.setPosition(renderRect.position.x
|
||||
+ renderRect.extent.x
|
||||
- 18 * Settings.uiScale,
|
||||
18 * Settings.uiScale
|
||||
+ renderRect.position.y
|
||||
+ scrollY);
|
||||
var visScrollY = Util.clamp(scrollYOld, 0, renderRect.extent.y - scrollBarYSize * Settings.uiScale);
|
||||
|
||||
this.clickInteractive.setPosition(renderRect.position.x + renderRect.extent.x - 18 * Settings.uiScale, 18 * Settings.uiScale + renderRect.position.y);
|
||||
this.scrollBarY.setPosition(renderRect.position.x + renderRect.extent.x - 18 * Settings.uiScale, renderRect.position.y + visScrollY);
|
||||
|
||||
this.clickInteractive.setPosition(renderRect.position.x + renderRect.extent.x - 18 * Settings.uiScale, renderRect.position.y);
|
||||
|
||||
this.clickInteractive.height = scrollExtentY;
|
||||
|
||||
|
|
@ -231,7 +227,7 @@ class GuiConsoleScrollCtrl extends GuiControl {
|
|||
for (c in this.children) {
|
||||
if (c == this.scrollTrack || c == this.scrollUpButton || c == this.scrollDownButton)
|
||||
continue;
|
||||
c.onScroll(0, scrollY * (this.maxScrollY - 34 * Settings.uiScale) / scrollExtentY);
|
||||
c.onScroll(0, scrollY * (this.maxScrollY / renderRect.extent.y) / scrollExtentY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||