Skip to content

[request] Use mouse scroll on World Map screen

PeLLeT_RSDPeLLeT_RSD Member Posts: 55
Is it possible to add the scroll function in the World Map? It was way better to move the map up and down using the mouse scroll.

I've tried some tweaks at the UI.menu but no success so far.

Does anybody have an idea?

Thanks!!

Comments

  • Mr2150Mr2150 Member Posts: 1,170
    I can't see how to do this. I'm not sure if it's even possible as the control for the drag option which moves the map currently is based on eventXCoord and eventYCoord (the mouse pointer location, I believe).

    HOWEVER - I can add two buttons that you press and hold that let you scroll it IF you've dragged it at least once in this game session. Not what you want at all...



    Search for "WORLD_MAP" and replace the code for the entire menu with this:

    menu { name "WORLD_MAP" align center center label { area 0 0 1024 768 mosaic GUIMAPWB } label { area 211 22 583 44 text "WORLD_MAP_TITLE" text style "title" } button { area 480 744 63 42 bam RGAROW sequence 2 actionhold " if eventYCoord < 0 then eventYCoord = eventYCoord + 100 elseif eventYCoord < 1142 then eventYCoord = eventYCoord + 30 end worldMapScreen:OnMapMouseMove(eventXCoord,eventYCoord) " } button { area 480 150 63 42 bam RGAROW sequence 1 actionhold " if eventYCoord > 571 then eventYCoord = eventYCoord - 100 elseif eventYCoord > -571 then eventYCoord = eventYCoord - 30 end worldMapScreen:OnMapMouseMove(eventXCoord,eventYCoord) " } button { area 51 35 66 58 bam "MAPBUT" action " worldMapScreen:OnCancelButtonClick() " } map { area 8 188 1008 560 worldmap action " worldMapScreen:OnMapMouseDown(eventXCoord,eventYCoord) " actionDbl " worldMapScreen:TravelToSelected() " actionDrag " worldMapScreen:OnMapMouseMove(eventXCoord,eventYCoord) " } button { area 783 715 230 44 enabled "worldMapScreen:IsTravelButtonVisible()" bam GUIBUTMT text "TRAVEL_BUTTON" text style "button" clickable lua "worldMapScreen:IsTravelButtonClickable()" action " worldMapScreen:TravelToSelected() " } }

    If you want the buttons to work the opposite way round just swap the IF statements round in the buttons with actionhold in them.
Sign In or Register to comment.