So you know derma and how in its Paint function all drawing functions like surface start their position(0, 0) on panels position?
Yeah I'm basically asking if thats possible and how to do it.
Thx in advance.
Detour the function. Would look something like this:
local oldPrint = print
print = function(msg)
msg = msg .. " im black"
return oldPrint(msg)
end
https://files.facepunch.com/forum/upload/471786/6acc20da-435b-4f7f-9fe6-6d6bee53c21f/a8b19cb0e32ad0da0e249b39784ef46b.png
The above code is just for proof of concept.
I really doubt that offsetting the values of all drawing functions is the proper solution to your problem though, and you probably shouldn't do it anyways. So, what is it exactly you need something like this for?
Look at my profile info.
Offsetting the values of all existing drawing functions isn't a good idea then, since you'll break a bunch of other stuff that uses them. Just create a new function that calls other drawing functions with whatever modifications you want to make.
Have a look at lua/includes/modules/draw.lua
In my case i can just detour it before the PAINT function and then get it back right after, so thats not a big problem for me. Just a little inconvinient.
Sorry, you need to Log In to post a reply to this thread.