Thread: Scrollbar vs Button_scroller
-
January 22nd, 2010, 02:50 #1
- Join Date
- Oct 2009
- Location
- GMT -6 hrs
- Posts
- 503
Scrollbar vs Button_scroller
Is there a difference between the Scrollbar and the Button Scroller? I kind of prefer to see a Scrollbar in Story windows. Has anyone implemented this or can suggest how it is used?
Thanks in advance!
-
January 22nd, 2010, 05:21 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,583
The scroller control can scroll up and down as well as left to right, while the scrollbar can only scroll in one direction. Several months ago, the original SmiteWorks team released a scrollbar template sample, but it has not really been worked into any rulesets yet.
It would be good to know how people feel about the scroller control. It works better for maps I think, but I generally like the scrollbar idea better for all the other windows.
Cheers,
JPG
-
January 22nd, 2010, 05:56 #3
It is used in the launcher ruleset. You can see it in the patch notes section and the list of rulesets and extensions if you have enough to force it to scroll. It is a little more intuitive IMO. I will see if I can locate some details for you on how to implement it.
-
January 22nd, 2010, 06:15 #4
Rolemaster also makes significant use of scrollbars, but these were developed and released before the SmiteWorks template control which, incidentally, broke the RMC ones due to the way the underlying FG engine was changed to make the SW scrollbar work. The RMC scrollbars were then 'fixed' to work with the new FG engine mechanics. The RMC scrollbars are used to control which part of the attack tables are visible, both horizontally and vertically, a bit like a spreadsheet.
The Base Ruleset also uses scrollbars in the DropDown controls, where there are more selection options than displayed items.
Stuart
-
January 22nd, 2010, 06:34 #5
Here it is:
Inside graphics_frames.xml
Code:<framedef name="scrollbar"> <bitmap file="frames/scrollbar.png" /> <top rect="0,0,20,31" /> <middle rect="20,0,20,94" /> <bottom rect="0,31,20,31" /> <decal rect="0,62,20,32" /> </framedef>
Code:<template name="scrollbar"> <genericcontrol name="campaignscrollbar"> <anchored> <left> <anchor>right</anchor> </left> <top> <anchor>top</anchor> </top> <size> <width>10</width> <height>10</height> </size> </anchored> <frame> <offset>5,4,5,4</offset> <name>scrollbar</name> </frame> <invisible /> <script> function update() if targetcontrol then local sx, px, vx, sy, py, vy = targetcontrol.getScrollState(); local tw, th = targetcontrol.getSize(); th = th + 2*marginy if vy < sy then local pos = py/sy * th; local height = vy/sy * th; setAnchor("left", target[1], "right", "absolute", 1 + marginx); setAnchoredWidth(10); setAnchor("top", target[1], "top", "absolute", pos - marginy); setAnchoredHeight(height); setVisible(true); else setVisible(false); end end end function onInit() targetcontrol = window[target[1]]; marginx = 0; marginy = 0; if barmargin and barmargin[1] and barmargin[1].x then marginx = barmargin[1].x[1]; end if barmargin and barmargin[1] and barmargin[1].y then marginy = barmargin[1].y[1]; end if targetcontrol then targetcontrol.onScroll = update; end end function onDrag(button, x, y, draginfo) if targetcontrol then if not dragging then local sx, px, vx, sy, py, vy = targetcontrol.getScrollState(); dragstarty = y; dragstartpos = py; dragfactor = sy/vy; end dragging = true; targetcontrol.setScrollPosition(0, dragstartpos + (y - dragstarty)*dragfactor); end return true; end function onDragEnd() dragging = false; end </script> </genericcontrol> </template>
Code:<scrollbar name="patchnotebar"> <barmargin> <x>1</x> <y>10</y> </barmargin> <target>patchnotes</target> </scrollbar>
-
January 22nd, 2010, 07:31 #6
The one thing I believe that would benefit from having a scroll bar in the story windows is knowing whereabouts in the story frame you are, especially if it’s a big one. Otherwise I have no problem with things as they are.
Previously: MurghBpurn
-
January 22nd, 2010, 07:36 #7
The other advantage about scrollbars is the ability to return to the top of a window (or navigate to the bottom) without having to hold down a scroller control for what seems like an age.
This is espcially true of some of the larger tracts of text in reference modules using inline index entries.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks