Client for playing 300 publicly available Sokoban puzzles on a computer or phone.
on.mouse_release = function(x,y, mouse_button)
	if not Show_code then
		if car.mouse_release then
			call_protected(car.mouse_release, x,y, mouse_button)
		end
		if car.mousereleased then
			call_protected(car.mousereleased, x,y, mouse_button)
		end
	else
		-- == menu area
		if Button_pressed then
			Button_pressed = nil
			return
		end
		-- == settings area
		Global_state.selected_slider = nil
		if Show_menu == 'settings' then
			if on_area(Settings_menu_area, x,y) then
				return
			end
		end
		-- == main area
		if Current_pane.editor_state.scrollbar_drag then
			adjust_scrollbar(Current_pane.editor_state, y)
			Current_pane.editor_state.scrollbar_drag = nil
			Current_pane.editor_state.scrollbar_offset = nil
		elseif on_editor_scrollbar_area(Current_pane.editor_state, x,y) then
			adjust_scrollbar(Current_pane.editor_state, y)
		elseif x < Current_pane.editor_state.right + 15 - 5 and y < Current_pane.editor_state.bottom + 5 + 10 - 5 then
			edit.mouse_release(Current_pane.editor_state, x,y, mouse_button)
		elseif Output_editor_state.scrollbar_drag then
			adjust_scrollbar(Output_editor_state, y)
			Output_editor_state.scrollbar_drag = nil
			Output_editor_state.scrollbar_offset = nil
		elseif on_editor_scrollbar_area(Output_editor_state, x,y) then
			adjust_scrollbar(Output_editor_state, y)
		end
	end
end