Resource icon

OBS Lua Lua Color Source 1.0

iwatchgamessometimes submitted a new resource:

Lua Color Source - A basic, solid, working example of how to make a video source filter in lua based on "Color Source"

After struggling to understand how to create a video source using the scripting interface, having found the documentation lacking in several ways, I finally pieced together this simple clone of the OBS Color Source found here:
https://raw.githubusercontent.com/obsproject/obs-studio/master/plugins/image-source/color-source.c

This script creates a new source called "Lua Color Source" that you can add to a scene, and it works exactly like the regular "Color Source". This may not...

Read more about this resource...
 

danyayoe

New Member
Hey. Help me please. How can mouse events be used in your code?

For example:

lcolor_source.mouse_click = function (data, event, type, mouse_up, click_count)
print ("mouse_click")
end

lcolor_source.key_click = function (data, event, key_up)
print ("key_click")
end

lcolor_source.focus = function (data, focus)
print ("focus")
end

lcolor_source.mouse_wheel = function (data, event, x_delta, y_delta)
print ("mouse_wheel")
end

lcolor_source.mouse_move = function (data, event, mouse_leave)
print ("mouse_move")
end

None of this works for me when I click on the white square with the mouse. If you have any ideas, please help me figure it out. Thank`s.
 
Top