Jump to content




How do I redefine printer functions


  • You cannot reply to this topic
2 replies to this topic

#1 houseofkraft

  • Members
  • 170 posts
  • LocationUSA

Posted 30 September 2016 - 12:19 PM

Hi Guys!

I would like to know how to redefine printer functions because I am making a custom printer and I want to overwrite the printer functions to support the custom printer

Thanks!

#2 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 30 September 2016 - 12:40 PM

The same way you would overwrite any functions. Make a variable pointing to the old function, and call that in your custom function.

#3 Sewbacca

  • Members
  • 450 posts
  • LocationStar Wars

Posted 30 September 2016 - 02:21 PM

Example:
-- API has the function foo
local native_API_foo = API.foo
API.foo = function (...)
  <CODE>
  native_API_foo(...)
end






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users