ID:94504
 
Resolved
It was possible to set a pane's pos and size parameters at runtime even if the pane wasn't scrollable, causing visual artifacts.
BYOND Version:465
Operating System:Windows XP Pro
Web Browser:K-Meleon
Applies to:Dream Seeker
Status: Resolved (480)

This issue has been resolved.
Descriptive Problem Summary: The background of the child panel fails to redraw under certain conditions.

Numbered Steps to Reproduce Problem: Download this test case: http://www.mediafire.com/?amnmndy4mxu

Test the project by minimizing and re-opening the window ... move it off screen, etc. to reproduce.

Code Snippet (if applicable) to Reproduce Problem:
mob/var/list/rooms = list()

mob/Login()
.=..()
Room_New("PIE")

mob/proc/Room_New( rname )
var/lname = lowertext( rname )

/*Output*/
var/list/params = new
var/list/s = params2list( winget(src,"cc_output;cc_userlist;cc_roomlist","size") )
for(var/item in s)
var/sx = text2num( item )
var/sy = text2num( copytext(item, findtext( item, "," ) + 1 ) )
s[s.Find(item)] = list(sx,sy);

params["parent"] = "cc_output"
params["anchor1"] = "0,0"
params["anchor2"] = "100,100"
params["border"] = "line"
params["pos"] = "0,0"
params["size"] = "[s[1][1]]x[s[1][2]]"
params["type"] = "output"

winset(src, "cc_output.[lname]", list2params(params))

/*Userlist*/
params = new

params["parent"] = "cc_userlist"
params["anchor1"] = "0,0"
params["anchor2"] = "100,100"
params["border"] = "line"
params["pos"] = "0,0"
params["size"] = "[s[2][1]]x[s[2][2]]"
params["type"] = "grid"

winset(src, "cc_userlist.[lname]", list2params(params))

/*Room Button*/
params = new

params["parent"] = "cc_roomlist"
params["anchor1"] = "0,0"
params["anchor2"] = "100,0"
params["command"] = "Room-Switch [lname]" //False command in this case... was just a portion of code I pulled from my project to force it to happen.
params["pos"] = "0,[20+(rooms.len*20)]"
params["size"] = "[s[3][1]]x20"
params["text"] = "#[rname]"
params["type"] = "button"

winset(src, "cc_roomlist.[lname]", list2params(params))
winset(src, "cc_roomlist","size=\"0x[40+(rooms.len*20)]\"")


(This needs a proper interface to work properly.)
Expected Results:Windows appear fine and have no artifacts.
Actual Results:Windows that were above or around the DreamSeeker window while moving around and minimizing/restoring the window seem to "bleed" through the empty space in the bottom right child panel.

Does the problem occur:
Every time
In other games? No
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur? On less complicated, simplistic interfaces.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? Don't currently have the time to test on multiple builds, but the bug is pretty persistent across PCs.

Workarounds:
Resizing the child pane seems to work most of the time as far as I know.

I can verify from your demo that this happens, but I'm not entirely sure why. I was able to find out that resizing the window or moving a splitter causes the redrawing issue to go away, but the issue recurs if I press the PIE button. Unfortunately I haven't been able to pick up on anything beyond that. I'll get back to this in a later release, so I'm not listing it as deferred yet.

Also I confirmed from your demo that this issue is not new to 465.

Just on a side note, I recommend you use a better file host in the future. Mediafire has some means of forcing popups to appear during a download that I haven't figured out.
Lummox JR wrote:
I can verify from your demo that this happens, but I'm not entirely sure why. I was able to find out that resizing the window or moving a splitter causes the redrawing issue to go away, but the issue recurs if I press the PIE button. Unfortunately I haven't been able to pick up on anything beyond that. I'll get back to this in a later release, so I'm not listing it as deferred yet.

Also I confirmed from your demo that this issue is not new to 465.

Just on a side note, I recommend you use a better file host in the future. Mediafire has some means of forcing popups to appear during a download that I haven't figured out.

Odd that it recurs after switching. This causes slight annoyances when trying to go for a dynamic interface. Anyhow, if there's anything else I can do to help, just let me know.

Also, sorry to hear about the hassles getting the project files. I'll make sure to remember that next time I go to upload. I was in a bit of a rush.
Not sure if this will help pinpoint it or not, but it seems setting scrolling for the "cc_roomlist" pane to "vertical" makes the issue magically disappear.