View previous topic :: View next topic |
Author |
Message |
pox911 Grandmaster Cheater Reputation: 28
Joined: 29 Nov 2008 Posts: 918
|
Posted: Tue Sep 02, 2014 1:29 am Post subject: Scrollbar for panels? |
|
|
Maybe im just blind but is there a way to make group boxes, panels, or page controls have a scroll bar at all?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Tue Sep 02, 2014 4:58 am Post subject: |
|
|
No, there is no scrollbox component right now. Perhaps next version.
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
pox911 Grandmaster Cheater Reputation: 28
Joined: 29 Nov 2008 Posts: 918
|
Posted: Tue Sep 02, 2014 9:50 am Post subject: |
|
|
Not a problem. Just means a slightly bigger window or breaking things down into page tabs.
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Tue Sep 02, 2014 10:59 am Post subject: |
|
|
You could draw a scrollbar.
I've drawn a scrollbar on image, and updated pos of the scrollbar, based on the current Y I copied rect from an image.
Another solution is using the mouse scroll events. (this isn't easy).
Basically place everything in 1 panel, extend the panel height and place everything in the order you want (increasing/decreasing all panel objects will impact performance a lot..).
(This script is basically from mgr.inz.Player UFO script
Here's an example (Just execute it and use the mouse scroll on the right side of the form*, as the form is the only object with scroll events, you can rewrite the function and achieve the same with an image, by storing old y of image, and on mouse movement even calculate the new y and the distance between old and new is the increase/decrease value of the panel position..)
Code: |
function test()
local desty = 0;
local cury = 0;
local scrolldis = 12 * 24;
local f = createForm();
local p = createPanel(f);
p.Caption = '';
p.height = f.height * 4;
p.width = f.width-15;
createCheckBox(p);
for i =1, math.floor((p.height/24)) do
local c = createCheckBox(p);
c.Top = i * (5 + 19);
c.Caption = i;
end
local t = createTimer(f, false);
t.Interval = 10
local function scrollDelta(amount)
local y = cury + amount
y = math.min(0,math.max(y,f.height-p.height))
if desty == y then return end
desty = y
if not t.Enabled then
t.Enabled = true
end
end
local function scrollOnTimer(timer)
local y = cury
local step = (desty-y) * 0.05
if step < 1 and step > 0 then step = 1 end
if step > -1 and step < 0 then step = -1 end
y = y + step
if step < 0 and y < desty then y = desty end
if step > 0 and y > desty then y = desty end
if math.abs(y) < 1 then y = 0 end
cury = y
if desty == y and timer then
timer_setEnabled(timer,false)
end
print(math.floor(y));
p.top = math.floor(y);
f.Caption = math.floor(y/(f.Height-p.height)*100);
end
local function scrollUp()
local speed = t.Enabled and 3 or 1
scrollDelta(scrolldis*speed);
end
local function scrollDown()
local speed = t.Enabled and (-3) or (-1)
scrollDelta(scrolldis*speed);
end
setMethodProperty(f,'OnMouseWheelDown',scrollDown)
setMethodProperty(f,'OnMouseWheelUp',scrollUp)
t.OnTimer = scrollOnTimer
end
test(); |
_________________
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Tue Sep 02, 2014 1:48 pm Post subject: |
|
|
DaSpamer wrote: | (This script is basically from mgr.inz.Player UFO script |
Not UFO, NFOWindow Anyway, updated NFOwindow here: http://forum.cheatengine.org/viewtopic.php?t=576006
I can try to create "decent" custom scrollbar.
_________________
|
|
Back to top |
|
|
pox911 Grandmaster Cheater Reputation: 28
Joined: 29 Nov 2008 Posts: 918
|
Posted: Tue Sep 02, 2014 3:20 pm Post subject: |
|
|
Yeah after posting i was thinking about it. A double layer panel could do the trick. The idea is the normal panel for seperating parts of the form but another panel in side of that. A basic script could do a check on the form size and show a vertical track bar if needed in the main panel but not inside the second. The track bar would move the secondary panel up and down as needed.
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Tue Sep 02, 2014 4:48 pm Post subject: |
|
|
WIP
_________________
|
|
Back to top |
|
|
|