Skip to content

Enlarged Worldmap dragging issue

kungfuhobbitkungfuhobbit Member Posts: 169
edited May 2020 in UI Modding
I enlarged the map, label frame (GUIMAPWB) and whatever the first label is.

Initial screen is great (Ignore the buttons in the screenshot; I can move them later)

But when I drag the map up and left in order to view the far southeast, it will let me drag it beyond the frame.
What controls this please?

Ive tried changing various numbers, including that 255 to 0.
The game's raw map is 1550 wide
0bwj1d24k6su.png
no9o0p4jdaez.png



original ui.menu snippet
menu
{
name "WORLD_MAP"
align center center
label
{
area 0 0 1044 694
fill 0 0 0 255
}
map
{
area 28 66 1000 564
worldmap
action
"
worldMapScreen:OnMapMouseDown(eventXCoord,eventYCoord)
if singleClickTravel and worldMapScreen:IsTravelButtonClickable() then
worldMapScreen:TravelToSelected()
end
"
actionDbl
"
worldMapScreen:TravelToSelected()
"
actionDrag
"
worldMapScreen:OnMapMouseMove(eventXCoord,eventYCoord)
"
}
label
{
area 0 0 1053 701
mosaic GUIMAPWB
ignoreEvents
}
label
{
area 222 12 600 44
text "WORLD_MAP_TITLE"
text style "title"
}
button
{
area 282 642 234 44
bam GUIOSTUL
text "TRAVEL_BUTTON"
text style "button"
clickable lua "worldMapScreen:IsTravelButtonClickable()"
action
"
worldMapScreen:TravelToSelected()
"
}
button
{
area 544 642 234 44
bam GUIOSTUR
text "BACK_BUTTON"
text style "button"
on escape
action
"
if worldMapScreen:IsTravelButtonVisible() or fromAreaMap then
worldMapScreen:OnCancelButtonClick()
else
e:GetActiveEngine():OnLeftPanelButtonClick(0)
end
fromAreaMap = false
"
}
}
`

my ui.menu snippet customised
menu
{
name "WORLD_MAP"
align center center
label
{
area 0 0 1594 993
fill 0 0 0 0
}
map
{
area 28 66 1550 860
worldmap
action
"
worldMapScreen:OnMapMouseDown(eventXCoord,eventYCoord)
if singleClickTravel and worldMapScreen:IsTravelButtonClickable() then
worldMapScreen:TravelToSelected()
end
"
actionDbl
"
worldMapScreen:TravelToSelected()
"
actionDrag
"
worldMapScreen:OnMapMouseMove(eventXCoord,eventYCoord)
"
}
label
{
area 0 0 1603 1000
mosaic GUIMAPWB
ignoreEvents
}
label
{
area 222 12 600 44
text "WORLD_MAP_TITLE"
text style "title"
}
button
{
area 282 642 234 44
bam GUIOSTUL
text "TRAVEL_BUTTON"
text style "button"
clickable lua "worldMapScreen:IsTravelButtonClickable()"
action
"
worldMapScreen:TravelToSelected()
"
}
button
{
area 544 642 234 44
bam GUIOSTUR
text "BACK_BUTTON"
text style "button"
on escape
action
"
if worldMapScreen:IsTravelButtonVisible() or fromAreaMap then
worldMapScreen:OnCancelButtonClick()
else
e:GetActiveEngine():OnLeftPanelButtonClick(0)
end
fromAreaMap = false
"
}
}
`

Comments

Sign In or Register to comment.