• Auto refresh size of derma DFrame
    5 replies, posted
Hi, I'm doing a scoreboard for derma, the scoreboard window has a size depending on the number of players on the server, and here I have a problem, the size of the window does not refresh until I open it again, someone has an idea, how can I do it? https://files.facepunch.com/forum/upload/110605/189c3f8e-d6b5-4591-8d5b-548979aa18d2/Half Life Source 2018.07.16 - 14.12.04.02.mp4
You can close and reopen it in the same frame whenever it's updated, might be a bit hacky. Don't think there is a way to update the bounds of a dframe while it's open.
Here's how I handled it. jailbreak/cl_scoreboard.lua at master · clrksml/jailbreak · GitH..
It didn't helped, DFrame is still static
When a new player gets added, the simplest way to do this is just simply close the frame. It seems lazy, but if the player is holding tab, and a player gets added, the scoreboard will close, and naturally the player will just press tab again.
Just call Panel/InvalidateLayout when the panel needs to get resized and change it's wide/height based on the rows (?) in PANEL/PerformLayout.
Sorry, you need to Log In to post a reply to this thread.